linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix more coding style issues in staging/kpc2000
@ 2019-05-23 11:36 Simon Sandström
  2019-05-23 11:36 ` [PATCH 1/8] staging: kpc2000: add blank line after declarations Simon Sandström
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Hi,

These patches fixes a few more minor coding style issues found in
staging/kpc2000/cell_probe.c. There are only two more types of
checkpatch.pl warnings left in this file with these patches applied:
"line over 80 characters" and "Macro argument reuse".

- Simon

Simon Sandström (8):
  staging: kpc2000: add blank line after declarations
  staging: kpc2000: use __func__ in debug messages
  staging: kpc2000: add missing asterisk in comment
  staging: kpc2000: fix alignment issues in cell_probe.c
  staging: kpc2000: remove extra blank lines in cell_probe.c
  staging: kpc2000: use kzalloc(sizeof(var)...) in cell_probe.c
  staging: kpc2000: remove unnecessary braces in cell_probe.c
  staging: kpc2000: remove unnecessary include in cell_probe.c

 drivers/staging/kpc2000/kpc2000/cell_probe.c | 80 ++++++++++----------
 1 file changed, 39 insertions(+), 41 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/8] staging: kpc2000: add blank line after declarations
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:36 ` [PATCH 2/8] staging: kpc2000: use __func__ in debug messages Simon Sandström
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warning "Missing a blank line after declarations".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index e5cddf0eeed3..95bfbe4aae4d 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -245,6 +245,7 @@ int  kp2000_check_uio_irq(struct kp2000_device *pcard, u32 irq_num)
 	u64 interrupt_active   =  readq(pcard->sysinfo_regs_base + REG_INTERRUPT_ACTIVE);
 	u64 interrupt_mask_inv = ~readq(pcard->sysinfo_regs_base + REG_INTERRUPT_MASK);
 	u64 irq_check_mask = (1 << irq_num);
+
 	if (interrupt_active & irq_check_mask) { // if it's active (interrupt pending)
 		if (interrupt_mask_inv & irq_check_mask) {    // and if it's not masked off
 			return 1;
@@ -257,6 +258,7 @@ static
 irqreturn_t  kuio_handler(int irq, struct uio_info *uioinfo)
 {
 	struct kpc_uio_device *kudev = uioinfo->priv;
+
 	if (irq != kudev->pcard->pdev->irq)
 		return IRQ_NONE;
 
@@ -506,8 +508,10 @@ void  kp2000_remove_cores(struct kp2000_device *pcard)
 {
 	struct list_head *ptr;
 	struct list_head *next;
+
 	list_for_each_safe(ptr, next, &pcard->uio_devices_list) {
 		struct kpc_uio_device *kudev = list_entry(ptr, struct kpc_uio_device, list);
+
 		uio_unregister_device(&kudev->uioinfo);
 		device_unregister(kudev->dev);
 		list_del(&kudev->list);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/8] staging: kpc2000: use __func__ in debug messages
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
  2019-05-23 11:36 ` [PATCH 1/8] staging: kpc2000: add blank line after declarations Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:55   ` Greg KH
  2019-05-23 11:36 ` [PATCH 3/8] staging: kpc2000: add missing asterisk in comment Simon Sandström
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using
'<function name>', this function's name, in a string".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 22 +++++++++++++-------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 95bfbe4aae4d..7b850f3e808b 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -299,7 +299,8 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
 
 	kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL);
 	if (!kudev) {
-		dev_err(&pcard->pdev->dev, "probe_core_uio: failed to kzalloc kpc_uio_device\n");
+		dev_err(&pcard->pdev->dev, "%s: failed to kzalloc kpc_uio_device\n",
+			__func__);
 		return -ENOMEM;
 	}
 
@@ -327,7 +328,8 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
 
 	kudev->dev = device_create(kpc_uio_class, &pcard->pdev->dev, MKDEV(0, 0), kudev, "%s.%d.%d.%d", kudev->uioinfo.name, pcard->card_num, cte.type, kudev->core_num);
 	if (IS_ERR(kudev->dev)) {
-		dev_err(&pcard->pdev->dev, "probe_core_uio device_create failed!\n");
+		dev_err(&pcard->pdev->dev, "%s: device_create failed!\n",
+			__func__);
 		kfree(kudev);
 		return -ENODEV;
 	}
@@ -335,7 +337,8 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
 
 	rv = uio_register_device(kudev->dev, &kudev->uioinfo);
 	if (rv) {
-		dev_err(&pcard->pdev->dev, "probe_core_uio failed uio_register_device: %d\n", rv);
+		dev_err(&pcard->pdev->dev, "%s: failed uio_register_device: %d\n",
+			__func__, rv);
 		put_device(kudev->dev);
 		kfree(kudev);
 		return rv;
@@ -410,7 +413,8 @@ static int  kp2000_setup_dma_controller(struct kp2000_device *pcard)
 	return 0;
 
 err_out:
-	dev_err(&pcard->pdev->dev, "kp2000_setup_dma_controller: failed to add a DMA Engine: %d\n", err);
+	dev_err(&pcard->pdev->dev, "%s: failed to add a DMA Engine: %d\n",
+		__func__, err);
 	return err;
 }
 
@@ -423,7 +427,8 @@ int  kp2000_probe_cores(struct kp2000_device *pcard)
 	unsigned int highest_core_id = 0;
 	struct core_table_entry cte;
 
-	dev_dbg(&pcard->pdev->dev, "kp2000_probe_cores(pcard = %p / %d)\n", pcard, pcard->card_num);
+	dev_dbg(&pcard->pdev->dev, "%s(pcard = %p / %d)\n", __func__, pcard,
+		pcard->card_num);
 
 	err = kp2000_setup_dma_controller(pcard);
 	if (err)
@@ -472,8 +477,8 @@ int  kp2000_probe_cores(struct kp2000_device *pcard)
 			}
 			if (err) {
 				dev_err(&pcard->pdev->dev,
-					"kp2000_probe_cores: failed to add core %d: %d\n",
-					i, err);
+					"%s: failed to add core %d: %d\n",
+					__func__, i, err);
 				goto error;
 			}
 			core_num++;
@@ -492,7 +497,8 @@ int  kp2000_probe_cores(struct kp2000_device *pcard)
 	cte.irq_base_num        = 0;
 	err = probe_core_uio(0, pcard, "kpc_uio", cte);
 	if (err) {
-		dev_err(&pcard->pdev->dev, "kp2000_probe_cores: failed to add board_info core: %d\n", err);
+		dev_err(&pcard->pdev->dev, "%s: failed to add board_info core: %d\n",
+			__func__, err);
 		goto error;
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/8] staging: kpc2000: add missing asterisk in comment
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
  2019-05-23 11:36 ` [PATCH 1/8] staging: kpc2000: add blank line after declarations Simon Sandström
  2019-05-23 11:36 ` [PATCH 2/8] staging: kpc2000: use __func__ in debug messages Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:36 ` [PATCH 4/8] staging: kpc2000: fix alignment issues in cell_probe.c Simon Sandström
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl error "code indent should use tabs where possible".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 7b850f3e808b..c4015c62686f 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -25,7 +25,7 @@
  *                                                              D                   C2S DMA Present
  *                                                               DDD                C2S DMA Channel Number    [up to 8 channels]
  *                                                                  II              IRQ Count [0 to 3 IRQs per core]
-                                                                      1111111000
+ *                                                                    1111111000
  *                                                                    IIIIIII       IRQ Base Number [up to 128 IRQs per card]
  *                                                                           ___    Spare
  *
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/8] staging: kpc2000: fix alignment issues in cell_probe.c
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (2 preceding siblings ...)
  2019-05-23 11:36 ` [PATCH 3/8] staging: kpc2000: add missing asterisk in comment Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:36 ` [PATCH 5/8] staging: kpc2000: remove extra blank lines " Simon Sandström
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warnings "Alignment should match open parenthesis"
and "Lines should not end with a '('".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 34 +++++++++-----------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index c4015c62686f..b621adb712ff 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -128,15 +128,13 @@ static int probe_core_basic(unsigned int core_num, struct kp2000_device *pcard,
 
 	cell.resources = resources;
 
-	return mfd_add_devices(
-		PCARD_TO_DEV(pcard),    // parent
-		pcard->card_num * 100,  // id
-		&cell,                  // struct mfd_cell *
-		1,                      // ndevs
-		&pcard->regs_base_resource,
-		0,                      // irq_base
-		NULL                    // struct irq_domain *
-	);
+	return mfd_add_devices(PCARD_TO_DEV(pcard),    // parent
+			       pcard->card_num * 100,  // id
+			       &cell,                  // struct mfd_cell *
+			       1,                      // ndevs
+			       &pcard->regs_base_resource,
+			       0,                      // irq_base
+			       NULL);                  // struct irq_domain *
 }
 
 
@@ -374,15 +372,13 @@ static int  create_dma_engine_core(struct kp2000_device *pcard, size_t engine_re
 
 	cell.resources = resources;
 
-	return mfd_add_devices(
-		PCARD_TO_DEV(pcard),    // parent
-		pcard->card_num * 100,  // id
-		&cell,                  // struct mfd_cell *
-		1,                      // ndevs
-		&pcard->dma_base_resource,
-		0,                      // irq_base
-		NULL                    // struct irq_domain *
-	);
+	return mfd_add_devices(PCARD_TO_DEV(pcard),    // parent
+			       pcard->card_num * 100,  // id
+			       &cell,                  // struct mfd_cell *
+			       1,                      // ndevs
+			       &pcard->dma_base_resource,
+			       0,                      // irq_base
+			       NULL);                  // struct irq_domain *
 }
 
 static int  kp2000_setup_dma_controller(struct kp2000_device *pcard)
@@ -463,7 +459,7 @@ int  kp2000_probe_cores(struct kp2000_device *pcard)
 			switch (cte.type) {
 			case KP_CORE_ID_I2C:
 				err = probe_core_basic(core_num, pcard,
-				KP_DRIVER_NAME_I2C, cte);
+						       KP_DRIVER_NAME_I2C, cte);
 				break;
 
 			case KP_CORE_ID_SPI:
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/8] staging: kpc2000: remove extra blank lines in cell_probe.c
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (3 preceding siblings ...)
  2019-05-23 11:36 ` [PATCH 4/8] staging: kpc2000: fix alignment issues in cell_probe.c Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:36 ` [PATCH 6/8] staging: kpc2000: use kzalloc(sizeof(var)...) " Simon Sandström
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warnings "Please don't use multiple blank lines".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index b621adb712ff..0da41ca17eb7 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -94,7 +94,6 @@ void parse_core_table_entry(struct core_table_entry *cte, const u64 read_val, co
 	}
 }
 
-
 static int probe_core_basic(unsigned int core_num, struct kp2000_device *pcard,
 			    char *name, const struct core_table_entry cte)
 {
@@ -111,7 +110,6 @@ static int probe_core_basic(unsigned int core_num, struct kp2000_device *pcard,
 
 	dev_dbg(&pcard->pdev->dev, "Found Basic core: type = %02d  dma = %02x / %02x  offset = 0x%x  length = 0x%x (%d regs)\n", cte.type, KPC_OLD_S2C_DMA_CH_NUM(cte), KPC_OLD_C2S_DMA_CH_NUM(cte), cte.offset, cte.length, cte.length / 8);
 
-
 	cell.platform_data = &core_pdata;
 	cell.pdata_size = sizeof(struct kpc_core_device_platdata);
 	cell.num_resources = 2;
@@ -137,7 +135,6 @@ static int probe_core_basic(unsigned int core_num, struct kp2000_device *pcard,
 			       NULL);                  // struct irq_domain *
 }
 
-
 struct kpc_uio_device {
 	struct list_head list;
 	struct kp2000_device *pcard;
@@ -347,7 +344,6 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
 	return 0;
 }
 
-
 static int  create_dma_engine_core(struct kp2000_device *pcard, size_t engine_regs_offset, int engine_num, int irq_num)
 {
 	struct mfd_cell  cell = { .id = engine_num };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/8] staging: kpc2000: use kzalloc(sizeof(var)...) in cell_probe.c
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (4 preceding siblings ...)
  2019-05-23 11:36 ` [PATCH 5/8] staging: kpc2000: remove extra blank lines " Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:36 ` [PATCH 7/8] staging: kpc2000: remove unnecessary braces " Simon Sandström
  2019-05-23 11:36 ` [PATCH 8/8] staging: kpc2000: remove unnecessary include " Simon Sandström
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*kudev)...) over
kzalloc(sizeof(struct kpc_uio_device)...)"

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 0da41ca17eb7..8d9254db9498 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -292,7 +292,7 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
 
 	dev_dbg(&pcard->pdev->dev, "Found UIO core:   type = %02d  dma = %02x / %02x  offset = 0x%x  length = 0x%x (%d regs)\n", cte.type, KPC_OLD_S2C_DMA_CH_NUM(cte), KPC_OLD_C2S_DMA_CH_NUM(cte), cte.offset, cte.length, cte.length / 8);
 
-	kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL);
+	kudev = kzalloc(sizeof(*kudev), GFP_KERNEL);
 	if (!kudev) {
 		dev_err(&pcard->pdev->dev, "%s: failed to kzalloc kpc_uio_device\n",
 			__func__);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 7/8] staging: kpc2000: remove unnecessary braces in cell_probe.c
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (5 preceding siblings ...)
  2019-05-23 11:36 ` [PATCH 6/8] staging: kpc2000: use kzalloc(sizeof(var)...) " Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  2019-05-23 11:36 ` [PATCH 8/8] staging: kpc2000: remove unnecessary include " Simon Sandström
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warnings "braces {} are not necessary for single
statement blocks".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 8d9254db9498..b1ce1e715d9a 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -273,11 +273,10 @@ int kuio_irqcontrol(struct uio_info *uioinfo, s32 irq_on)
 
 	mutex_lock(&pcard->sem);
 	mask = readq(pcard->sysinfo_regs_base + REG_INTERRUPT_MASK);
-	if (irq_on) {
+	if (irq_on)
 		mask &= ~(1 << (kudev->cte.irq_base_num));
-	} else {
+	else
 		mask |= (1 << (kudev->cte.irq_base_num));
-	}
 	writeq(mask, pcard->sysinfo_regs_base + REG_INTERRUPT_MASK);
 	mutex_unlock(&pcard->sem);
 
@@ -433,12 +432,10 @@ int  kp2000_probe_cores(struct kp2000_device *pcard)
 		read_val = readq(pcard->sysinfo_regs_base + ((pcard->core_table_offset + i) * 8));
 		parse_core_table_entry(&cte, read_val, pcard->core_table_rev);
 		dbg_cte(pcard, &cte);
-		if (cte.type > highest_core_id) {
+		if (cte.type > highest_core_id)
 			highest_core_id = cte.type;
-		}
-		if (cte.type == KP_CORE_ID_INVALID) {
+		if (cte.type == KP_CORE_ID_INVALID)
 			dev_info(&pcard->pdev->dev, "Found Invalid core: %016llx\n", read_val);
-		}
 	}
 	// Then, iterate over the possible core types.
 	for (current_type_id = 1 ; current_type_id <= highest_core_id ; current_type_id++) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 8/8] staging: kpc2000: remove unnecessary include in cell_probe.c
  2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (6 preceding siblings ...)
  2019-05-23 11:36 ` [PATCH 7/8] staging: kpc2000: remove unnecessary braces " Simon Sandström
@ 2019-05-23 11:36 ` Simon Sandström
  7 siblings, 0 replies; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 11:36 UTC (permalink / raw)
  To: gregkh; +Cc: simon, jeremy, dan.carpenter, devel, linux-kernel

Fixes checkpatch.pl warning "Use #include <linux/io.h> instead of
<asm/io.h>".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index b1ce1e715d9a..00005017c850 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -4,7 +4,6 @@
 #include <linux/types.h>
 #include <linux/export.h>
 #include <linux/slab.h>
-#include <asm/io.h>
 #include <linux/io.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/mfd/core.h>
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/8] staging: kpc2000: use __func__ in debug messages
  2019-05-23 11:36 ` [PATCH 2/8] staging: kpc2000: use __func__ in debug messages Simon Sandström
@ 2019-05-23 11:55   ` Greg KH
  2019-05-23 12:09     ` Simon Sandström
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2019-05-23 11:55 UTC (permalink / raw)
  To: Simon Sandström; +Cc: devel, linux-kernel, dan.carpenter

On Thu, May 23, 2019 at 01:36:07PM +0200, Simon Sandström wrote:
> Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using
> '<function name>', this function's name, in a string".
> 
> Signed-off-by: Simon Sandström <simon@nikanor.nu>
> ---
>  drivers/staging/kpc2000/kpc2000/cell_probe.c | 22 +++++++++++++-------
>  1 file changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
> index 95bfbe4aae4d..7b850f3e808b 100644
> --- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
> +++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
> @@ -299,7 +299,8 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
>  
>  	kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL);
>  	if (!kudev) {
> -		dev_err(&pcard->pdev->dev, "probe_core_uio: failed to kzalloc kpc_uio_device\n");
> +		dev_err(&pcard->pdev->dev, "%s: failed to kzalloc kpc_uio_device\n",
> +			__func__);

kmalloc and friend error messages should just be deleted.  Didn't
checkpatch say something about that?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/8] staging: kpc2000: use __func__ in debug messages
  2019-05-23 11:55   ` Greg KH
@ 2019-05-23 12:09     ` Simon Sandström
  2019-05-23 12:26       ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Simon Sandström @ 2019-05-23 12:09 UTC (permalink / raw)
  To: Greg KH; +Cc: devel, linux-kernel, dan.carpenter

On Thu, May 23, 2019 at 01:55:53PM +0200, Greg KH wrote:
> On Thu, May 23, 2019 at 01:36:07PM +0200, Simon Sandström wrote:
> > Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using
> > '<function name>', this function's name, in a string".
> > 
> > Signed-off-by: Simon Sandström <simon@nikanor.nu>
> > ---
> >  drivers/staging/kpc2000/kpc2000/cell_probe.c | 22 +++++++++++++-------
> >  1 file changed, 14 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
> > index 95bfbe4aae4d..7b850f3e808b 100644
> > --- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
> > +++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
> > @@ -299,7 +299,8 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
> >  
> >  	kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL);
> >  	if (!kudev) {
> > -		dev_err(&pcard->pdev->dev, "probe_core_uio: failed to kzalloc kpc_uio_device\n");
> > +		dev_err(&pcard->pdev->dev, "%s: failed to kzalloc kpc_uio_device\n",
> > +			__func__);
> 
> kmalloc and friend error messages should just be deleted.  Didn't
> checkpatch say something about that?
> 
> thanks,
> 
> greg k-h

Yes sorry, it did. Should I delete this chunk from this patch and add
another patch to this series that just deletes the message, in v2?

- Simon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/8] staging: kpc2000: use __func__ in debug messages
  2019-05-23 12:09     ` Simon Sandström
@ 2019-05-23 12:26       ` Greg KH
  0 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2019-05-23 12:26 UTC (permalink / raw)
  To: Simon Sandström; +Cc: devel, linux-kernel, dan.carpenter

On Thu, May 23, 2019 at 02:09:37PM +0200, Simon Sandström wrote:
> On Thu, May 23, 2019 at 01:55:53PM +0200, Greg KH wrote:
> > On Thu, May 23, 2019 at 01:36:07PM +0200, Simon Sandström wrote:
> > > Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using
> > > '<function name>', this function's name, in a string".
> > > 
> > > Signed-off-by: Simon Sandström <simon@nikanor.nu>
> > > ---
> > >  drivers/staging/kpc2000/kpc2000/cell_probe.c | 22 +++++++++++++-------
> > >  1 file changed, 14 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
> > > index 95bfbe4aae4d..7b850f3e808b 100644
> > > --- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
> > > +++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
> > > @@ -299,7 +299,8 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard,
> > >  
> > >  	kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL);
> > >  	if (!kudev) {
> > > -		dev_err(&pcard->pdev->dev, "probe_core_uio: failed to kzalloc kpc_uio_device\n");
> > > +		dev_err(&pcard->pdev->dev, "%s: failed to kzalloc kpc_uio_device\n",
> > > +			__func__);
> > 
> > kmalloc and friend error messages should just be deleted.  Didn't
> > checkpatch say something about that?
> > 
> > thanks,
> > 
> > greg k-h
> 
> Yes sorry, it did. Should I delete this chunk from this patch and add
> another patch to this series that just deletes the message, in v2?

Yes please.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-05-23 12:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 11:36 [PATCH 0/8] Fix more coding style issues in staging/kpc2000 Simon Sandström
2019-05-23 11:36 ` [PATCH 1/8] staging: kpc2000: add blank line after declarations Simon Sandström
2019-05-23 11:36 ` [PATCH 2/8] staging: kpc2000: use __func__ in debug messages Simon Sandström
2019-05-23 11:55   ` Greg KH
2019-05-23 12:09     ` Simon Sandström
2019-05-23 12:26       ` Greg KH
2019-05-23 11:36 ` [PATCH 3/8] staging: kpc2000: add missing asterisk in comment Simon Sandström
2019-05-23 11:36 ` [PATCH 4/8] staging: kpc2000: fix alignment issues in cell_probe.c Simon Sandström
2019-05-23 11:36 ` [PATCH 5/8] staging: kpc2000: remove extra blank lines " Simon Sandström
2019-05-23 11:36 ` [PATCH 6/8] staging: kpc2000: use kzalloc(sizeof(var)...) " Simon Sandström
2019-05-23 11:36 ` [PATCH 7/8] staging: kpc2000: remove unnecessary braces " Simon Sandström
2019-05-23 11:36 ` [PATCH 8/8] staging: kpc2000: remove unnecessary include " Simon Sandström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).