Skip to contentSkip to conversation

drivers/clk/clk-asm9260.c

PATCH In review YourName 3 participants 3 messages Aug 10, 2020

Subsystems (4)
lore
Share & tools
lore

YourName

author
#0 lore raw

PATCH 3/3 drivers/clk/clk-asm9260.c

From: Daniel <[email protected]>

---
 drivers/ata/acard-ahci.c  |  6 +++---
 drivers/bluetooth/bfusb.c |  5 ++---
 drivers/clk/clk-asm9260.c | 12 ++++++------
 3 files changed, 11 insertions(+), 12 deletions(-)
drivers/ata/acard-ahci.c +3 -3
index 2a04e8abd397..3ffb21f3e88b 100644
@@ -79,10 +79,10 @@ static struct ata_port_operations acard_ops = {
 
 #define AHCI_HFLAGS(flags)	.private_data	= (void *)(flags)
 
-static const struct ata_port_info acard_ahci_port_info[] = {
+static const struct ata_port_info acard_ahci_port_info[] ={
 	[board_acard_ahci] =
-	{
-		AHCI_HFLAGS	(AHCI_HFLAG_NO_NCQ),
+	
+        {       AHCI_HFLAGS	(AHCI_HFLAG_NO_NCQ),
 		.flags		= AHCI_FLAG_COMMON,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= ATA_UDMA6,
drivers/bluetooth/bfusb.c +2 -3
index 5a321b4076aa..dc6a62cb1941 100644
@@ -355,15 +355,14 @@ static void bfusb_rx_complete(struct urb *urb)
 	while (count) {
 		hdr = buf[0] | (buf[1] << 8);
 
-		if (hdr & 0x4000) {
+		if (hdr & 0x4000) 
 			len = 0;
 			count -= 2;
 			buf   += 2;
-		} else {
+		 else {
 			len = (buf[2] == 0) ? 256 : buf[2];
 			count -= 3;
 			buf   += 3;
-		}
 
 		if (count < len) {
 			bt_dev_err(data->hdev, "block extends over URB buffer ranges");
drivers/clk/clk-asm9260.c +6 -6
index bacebd457e6f..4e608807a00a 100644
@@ -92,8 +92,8 @@ static const struct asm9260_div_clk asm9260_div_clks[] __initconst = {
 	{ CLKID_SYS_CPU,	"cpu_div", "main_gate", HW_CPUCLKDIV },
 	{ CLKID_SYS_AHB,	"ahb_div", "cpu_div", HW_SYSAHBCLKDIV },
 
-	/* i2s has two deviders: one for only external mclk and internal
-	 * devider for all clks. */
+	//i2s has two deviders: one for only external mclk and internal
+	//devider for all clks.
 	{ CLKID_SYS_I2S0M,	"i2s0m_div", "i2s0_mclk",  HW_I2S0MCLKDIV },
 	{ CLKID_SYS_I2S1M,	"i2s1m_div", "i2s1_mclk",  HW_I2S1MCLKDIV },
 	{ CLKID_SYS_I2S0S,	"i2s0s_div", "i2s0_gate",  HW_I2S0SCLKDIV },
@@ -232,10 +232,10 @@ static const struct asm9260_gate_data asm9260_ahb_gates[] __initconst = {
 		HW_AHBCLKCTRL1,	16 },
 };
 
-static const char __initdata *main_mux_p[] =   { NULL, NULL };
-static const char __initdata *i2s0_mux_p[] =   { NULL, NULL, "i2s0m_div"};
-static const char __initdata *i2s1_mux_p[] =   { NULL, NULL, "i2s1m_div"};
-static const char __initdata *clkout_mux_p[] = { NULL, NULL, "rtc"};
+static const char __initconst *main_mux_p[] =   { NULL, NULL };
+static const char __initconst *i2s0_mux_p[] =   { NULL, NULL, "i2s0m_div"};
+static const char __initconst *i2s1_mux_p[] =   { NULL, NULL, "i2s1m_div"};
+static const char __initconst *clkout_mux_p[] = { NULL, NULL, "rtc"};
 static u32 three_mux_table[] = {0, 1, 3};
 
 static struct asm9260_mux_clock asm9260_mux_clks[] __initdata = {
Signature · 1 line
2.25.1
#1 lore raw

Hello!

Quoted 1 line · YourName

From: Daniel <[email protected]>

Full name needed here.

Quoted 11 lines
---
  drivers/ata/acard-ahci.c  |  6 +++---
  drivers/bluetooth/bfusb.c |  5 ++---
  drivers/clk/clk-asm9260.c | 12 ++++++------
  3 files changed, 11 insertions(+), 12 deletions(-)
drivers/ata/acard-ahci.c +0 -0
index 2a04e8abd397..3ffb21f3e88b 100644

drivers/ata/acard-ahci.c static struct ata_port_operations acard_ops = { · line 85

Quoted 10 lines
drivers/ata/acard-ahci.c +3 -3
@@ -79,10 +79,10 @@ static struct ata_port_operations acard_ops = {
 
  #define AHCI_HFLAGS(flags)	.private_data	= (void *)(flags)
 
-static const struct ata_port_info acard_ahci_port_info[] = {
+static const struct ata_port_info acard_ahci_port_info[] ={
  	[board_acard_ahci] =
-	{
-		AHCI_HFLAGS	(AHCI_HFLAG_NO_NCQ),
+	
+        {       AHCI_HFLAGS	(AHCI_HFLAG_NO_NCQ),

This does nothing except ruining the valid code formatting.

Quoted 12 lines
drivers/ata/acard-ahci.c +0 -0
  		.flags		= AHCI_FLAG_COMMON,
  		.pio_mask	= ATA_PIO4,
  		.udma_mask	= ATA_UDMA6,
drivers/bluetooth/bfusb.c +0 -1
index 5a321b4076aa..dc6a62cb1941 100644
@@ -355,15 +355,14 @@ static void bfusb_rx_complete(struct urb *urb)
  	while (count) {
  		hdr = buf[0] | (buf[1] << 8);
 
-		if (hdr & 0x4000) {

drivers/bluetooth/bfusb.c static void bfusb_rx_complete(struct urb *urb) · line 366

Quoted 10 lines
drivers/bluetooth/bfusb.c +2 -2
+		if (hdr & 0x4000)
  			len = 0;
  			count -= 2;
  			buf   += 2;
-		} else {
+		 else {
  			len = (buf[2] == 0) ? 256 : buf[2];
  			count -= 3;
  			buf   += 3;
-		}

This just ruins the code.

Quoted 8 lines
drivers/bluetooth/bfusb.c +0 -0
  		if (count < len) {
  			bt_dev_err(data->hdev, "block extends over URB buffer ranges");
drivers/clk/clk-asm9260.c +0 -0
index bacebd457e6f..4e608807a00a 100644

drivers/clk/clk-asm9260.c static const struct asm9260_div_clk asm9260_div_clks[] __initconst = { · line 96

Quoted 7 lines
drivers/clk/clk-asm9260.c +2 -2
@@ -92,8 +92,8 @@ static const struct asm9260_div_clk asm9260_div_clks[] __initconst = {
  	{ CLKID_SYS_CPU,	"cpu_div", "main_gate", HW_CPUCLKDIV },
  	{ CLKID_SYS_AHB,	"ahb_div", "cpu_div", HW_SYSAHBCLKDIV },
 
-	/* i2s has two deviders: one for only external mclk and internal
-	 * devider for all clks. */
+	//i2s has two deviders: one for only external mclk and internal
+	//devider for all clks.

Divider. :-) This is not the preferred multi-line comment formatting anyway.

drivers/clk/clk-asm9260.c static const struct asm9260_div_clk asm9260_div_clks[] __initconst = { · line 99

Quoted 3 lines
drivers/clk/clk-asm9260.c +0 -0
  	{ CLKID_SYS_I2S0M,	"i2s0m_div", "i2s0_mclk",  HW_I2S0MCLKDIV },
  	{ CLKID_SYS_I2S1M,	"i2s1m_div", "i2s1_mclk",  HW_I2S1MCLKDIV },
  	{ CLKID_SYS_I2S0S,	"i2s0s_div", "i2s0_gate",  HW_I2S0SCLKDIV },

[...]

MBR, Sergei

maintainer
#2 lore raw

Hi,

Quoted 9 lines
Quoted 1 line

From: Daniel <[email protected]>

Full name needed here.

Quoted 5 lines

---

drivers/ata/acard-ahci.c  |  6 +++---
drivers/bluetooth/bfusb.c |  5 ++---
drivers/clk/clk-asm9260.c | 12 ++++++------
3 files changed, 11 insertions(+), 12 deletions(-)

please don’t intermix patches for different subsystems. And have a proper commit message explaining what is changed.

Regards

Marcel