Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: rockchip: Perform trivial code cleanups

Perform a few trivial code cleanups, to obey the reverse Christmas tree rule,
to avoid unnecessary line wrapping by using the 100-column width better, to
actually obey the 100-column width in one case, and to make the way a couple
of wrapped function arguments are indented a bit more readable.

No intended functional changes are introduced by these code cleanups.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://patch.msgid.link/1b55380a0b9f0e8fe1a09611636b30e232b95d08.1727601608.git.dsimic@manjaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Dragan Simic and committed by
Mark Brown
f7bc1521 8cf0b939

+13 -16
+13 -16
drivers/spi/spi-rockchip.c
··· 742 742 743 743 static int rockchip_spi_probe(struct platform_device *pdev) 744 744 { 745 - int ret; 746 - struct rockchip_spi *rs; 747 - struct spi_controller *ctlr; 748 - struct resource *mem; 749 745 struct device_node *np = pdev->dev.of_node; 746 + struct spi_controller *ctlr; 747 + struct rockchip_spi *rs; 748 + struct resource *mem; 750 749 u32 rsd_nsecs, num_cs; 751 750 bool target_mode; 751 + int ret; 752 752 753 753 target_mode = of_property_read_bool(np, "spi-slave"); 754 754 755 755 if (target_mode) 756 - ctlr = spi_alloc_target(&pdev->dev, 757 - sizeof(struct rockchip_spi)); 756 + ctlr = spi_alloc_target(&pdev->dev, sizeof(struct rockchip_spi)); 758 757 else 759 - ctlr = spi_alloc_host(&pdev->dev, 760 - sizeof(struct rockchip_spi)); 758 + ctlr = spi_alloc_host(&pdev->dev, sizeof(struct rockchip_spi)); 761 759 762 760 if (!ctlr) 763 761 return -ENOMEM; ··· 767 769 /* Get basic io resource and map it */ 768 770 rs->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); 769 771 if (IS_ERR(rs->regs)) { 770 - ret = PTR_ERR(rs->regs); 772 + ret = PTR_ERR(rs->regs); 771 773 goto err_put_ctlr; 772 774 } 773 775 ··· 792 794 goto err_put_ctlr; 793 795 794 796 ret = devm_request_threaded_irq(&pdev->dev, ret, rockchip_spi_isr, NULL, 795 - IRQF_ONESHOT, dev_name(&pdev->dev), ctlr); 797 + IRQF_ONESHOT, dev_name(&pdev->dev), ctlr); 796 798 if (ret) 797 799 goto err_put_ctlr; 798 800 ··· 802 804 if (!of_property_read_u32(pdev->dev.of_node, "rx-sample-delay-ns", 803 805 &rsd_nsecs)) { 804 806 /* rx sample delay is expressed in parent clock cycles (max 3) */ 805 - u32 rsd = DIV_ROUND_CLOSEST(rsd_nsecs * (rs->freq >> 8), 806 - 1000000000 >> 8); 807 + u32 rsd = DIV_ROUND_CLOSEST(rsd_nsecs * (rs->freq >> 8), 1000000000 >> 8); 807 808 if (!rsd) { 808 809 dev_warn(rs->dev, "%u Hz are too slow to express %u ns delay\n", 809 - rs->freq, rsd_nsecs); 810 + rs->freq, rsd_nsecs); 810 811 } else if (rsd > CR0_RSD_MAX) { 811 812 rsd = CR0_RSD_MAX; 812 - dev_warn(rs->dev, "%u Hz are too fast to express %u ns delay, clamping at %u ns\n", 813 - rs->freq, rsd_nsecs, 814 - CR0_RSD_MAX * 1000000000U / rs->freq); 813 + dev_warn(rs->dev, 814 + "%u Hz are too fast to express %u ns delay, clamping at %u ns\n", 815 + rs->freq, rsd_nsecs, CR0_RSD_MAX * 1000000000U / rs->freq); 815 816 } 816 817 rs->rsd = rsd; 817 818 }