linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000
@ 2019-05-23 12:51 Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 1/9] staging: kpc2000: add blank line after declarations Simon Sandström
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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".

Changed in v2: don't bother fixing the __func__ usage in the out of
               memory debug message, instead add a patch that removes
               it completely.

- Simon

Simon Sandström (9):
  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
  staging: kpc2000: remove unnecessary oom message

 drivers/staging/kpc2000/kpc2000/cell_probe.c | 81 +++++++++-----------
 1 file changed, 38 insertions(+), 43 deletions(-)

-- 
2.20.1


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

* [PATCH v2 1/9] staging: kpc2000: add blank line after declarations
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 2/9] staging: kpc2000: use __func__ in debug messages Simon Sandström
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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] 10+ messages in thread

* [PATCH v2 2/9] staging: kpc2000: use __func__ in debug messages
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 1/9] staging: kpc2000: add blank line after declarations Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 3/9] staging: kpc2000: add missing asterisk in comment Simon Sandström
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 95bfbe4aae4d..b559ade04aca 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -327,7 +327,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 +336,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 +412,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 +426,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 +476,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 +496,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] 10+ messages in thread

* [PATCH v2 3/9] staging: kpc2000: add missing asterisk in comment
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 1/9] staging: kpc2000: add blank line after declarations Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 2/9] staging: kpc2000: use __func__ in debug messages Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 4/9] staging: kpc2000: fix alignment issues in cell_probe.c Simon Sandström
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 b559ade04aca..945d8e4e7ba5 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] 10+ messages in thread

* [PATCH v2 4/9] staging: kpc2000: fix alignment issues in cell_probe.c
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (2 preceding siblings ...)
  2019-05-23 12:51 ` [PATCH v2 3/9] staging: kpc2000: add missing asterisk in comment Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 5/9] staging: kpc2000: remove extra blank lines " Simon Sandström
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 945d8e4e7ba5..5b88504b00ec 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 *
 }
 
 
@@ -373,15 +371,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)
@@ -462,7 +458,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] 10+ messages in thread

* [PATCH v2 5/9] staging: kpc2000: remove extra blank lines in cell_probe.c
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (3 preceding siblings ...)
  2019-05-23 12:51 ` [PATCH v2 4/9] staging: kpc2000: fix alignment issues in cell_probe.c Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 6/9] staging: kpc2000: use kzalloc(sizeof(var)...) " Simon Sandström
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 5b88504b00ec..f8d19e693f21 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;
@@ -346,7 +343,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] 10+ messages in thread

* [PATCH v2 6/9] staging: kpc2000: use kzalloc(sizeof(var)...) in cell_probe.c
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (4 preceding siblings ...)
  2019-05-23 12:51 ` [PATCH v2 5/9] staging: kpc2000: remove extra blank lines " Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 7/9] staging: kpc2000: remove unnecessary braces " Simon Sandström
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 f8d19e693f21..caf48256aa2e 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, "probe_core_uio: failed to kzalloc kpc_uio_device\n");
 		return -ENOMEM;
-- 
2.20.1


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

* [PATCH v2 7/9] staging: kpc2000: remove unnecessary braces in cell_probe.c
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (5 preceding siblings ...)
  2019-05-23 12:51 ` [PATCH v2 6/9] staging: kpc2000: use kzalloc(sizeof(var)...) " Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 8/9] staging: kpc2000: remove unnecessary include " Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 9/9] staging: kpc2000: remove unnecessary oom message Simon Sandström
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 caf48256aa2e..682d61da5369 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);
 
@@ -432,12 +431,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] 10+ messages in thread

* [PATCH v2 8/9] staging: kpc2000: remove unnecessary include in cell_probe.c
  2019-05-23 12:51 [PATCH v2 0/9] Fix more coding style issues in staging/kpc2000 Simon Sandström
                   ` (6 preceding siblings ...)
  2019-05-23 12:51 ` [PATCH v2 7/9] staging: kpc2000: remove unnecessary braces " Simon Sandström
@ 2019-05-23 12:51 ` Simon Sandström
  2019-05-23 12:51 ` [PATCH v2 9/9] staging: kpc2000: remove unnecessary oom message Simon Sandström
  8 siblings, 0 replies; 10+ messages in thread
From: Simon Sandström @ 2019-05-23 12:51 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 682d61da5369..5e65bd56d66e 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] 10+ messages in thread

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

Fixes checkpatch.pl warning "Possible unnecessary 'out of memory'
message".

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

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 5e65bd56d66e..f731a97c6cac 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -291,10 +291,8 @@ 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(*kudev), GFP_KERNEL);
-	if (!kudev) {
-		dev_err(&pcard->pdev->dev, "probe_core_uio: failed to kzalloc kpc_uio_device\n");
+	if (!kudev)
 		return -ENOMEM;
-	}
 
 	INIT_LIST_HEAD(&kudev->list);
 	kudev->pcard = pcard;
-- 
2.20.1


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

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

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