linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: most: fix coding style issues
@ 2019-06-29 23:44 Gabriel Beauchamp
  2019-06-29 23:58 ` Joe Perches
  0 siblings, 1 reply; 11+ messages in thread
From: Gabriel Beauchamp @ 2019-06-29 23:44 UTC (permalink / raw)
  To: gregkh, christian.gromm, colin.king, gustavo
  Cc: devel, linux-kernel, Gabriel Beauchamp

This is a patch for the core.[ch] files that fixes up warnings
found with the checkpatch.pl tool.

Signed-off-by: Gabriel Beauchamp <beauchampgabriel@gmail.com>
---
 drivers/staging/most/core.c | 4 +++-
 drivers/staging/most/core.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index 86a8545c8d97..f49c550ed48e 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -303,7 +303,8 @@ static ssize_t set_datatype_show(struct device *dev,
 
 	for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
 		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type)
-			return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name);
+			return snprintf(buf, PAGE_SIZE,
+					"%s", ch_data_type[i].name);
 	}
 	return snprintf(buf, PAGE_SIZE, "unconfigured\n");
 }
@@ -728,6 +729,7 @@ int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
 
 	return link_channel_to_component(c, comp, link_name, comp_param);
 }
+
 /**
  * remove_link_store - store function for remove_link attribute
  * @drv: device driver
diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h
index 652aaa771029..6ba7c2b34c1c 100644
--- a/drivers/staging/most/core.h
+++ b/drivers/staging/most/core.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * most.h - API for component and adapter drivers
  *
-- 
2.21.0


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

* Re: [PATCH] Staging: most: fix coding style issues
  2019-06-29 23:44 [PATCH] Staging: most: fix coding style issues Gabriel Beauchamp
@ 2019-06-29 23:58 ` Joe Perches
  2019-06-30 15:27   ` [PATCH v2] " Gabriel Beauchamp
  0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2019-06-29 23:58 UTC (permalink / raw)
  To: Gabriel Beauchamp, gregkh, christian.gromm, colin.king, gustavo
  Cc: devel, linux-kernel

On Sat, 2019-06-29 at 16:44 -0700, Gabriel Beauchamp wrote:
> This is a patch for the core.[ch] files that fixes up warnings
> found with the checkpatch.pl tool.
[]
> diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
[]
> @@ -303,7 +303,8 @@ static ssize_t set_datatype_show(struct device *dev,
>  
>  	for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
>  		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type)
> -			return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name);
> +			return snprintf(buf, PAGE_SIZE,
> +					"%s", ch_data_type[i].name);
>  	}
>  	return snprintf(buf, PAGE_SIZE, "unconfigured\n");
>  }

Assuming the newline difference is unintentional,
(if not change "unconfigured" to "unconfigured\n")

How about using a single sprintf and reducing object code size too?

	char *type = "unconfigured";

	for (...)
		if (c-> etc...) {
			type = ch_data_type[i].name;
			break;
		}
	}

	return snprintf(buf, PAGE_SIZE, "%s", type);




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

* [PATCH v2] Staging: most: fix coding style issues
  2019-06-29 23:58 ` Joe Perches
@ 2019-06-30 15:27   ` Gabriel Beauchamp
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
  2019-07-01  6:48     ` [PATCH v2] " Greg KH
  0 siblings, 2 replies; 11+ messages in thread
From: Gabriel Beauchamp @ 2019-06-30 15:27 UTC (permalink / raw)
  To: gregkh, christian.gromm, colin.king, gustavo, joe
  Cc: devel, linux-kernel, Gabriel Beauchamp

This is a patch for the core.[ch] files that fixes up warnings
found with the checkpatch.pl tool.

Signed-off-by: Gabriel Beauchamp <beauchampgabriel@gmail.com>
---
Changes in v2:
- use a single snprintf
---
 drivers/staging/most/core.c | 7 +++++--
 drivers/staging/most/core.h | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index 86a8545c8d97..852f8788ce2e 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -299,13 +299,15 @@ static ssize_t set_datatype_show(struct device *dev,
 				 char *buf)
 {
 	int i;
+	char *type = "unconfigured\n";
+
 	struct most_channel *c = to_channel(dev);
 
 	for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
 		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type)
-			return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name);
+			type = ch_data_type[i].name;
 	}
-	return snprintf(buf, PAGE_SIZE, "unconfigured\n");
+	return snprintf(buf, PAGE_SIZE, "%s", type);
 }
 
 static ssize_t set_subbuffer_size_show(struct device *dev,
@@ -728,6 +730,7 @@ int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
 
 	return link_channel_to_component(c, comp, link_name, comp_param);
 }
+
 /**
  * remove_link_store - store function for remove_link attribute
  * @drv: device driver
diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h
index 652aaa771029..6ba7c2b34c1c 100644
--- a/drivers/staging/most/core.h
+++ b/drivers/staging/most/core.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * most.h - API for component and adapter drivers
  *
-- 
2.21.0


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

* [PATCH v3] Staging: most: fix coding style issues
  2019-06-30 15:27   ` [PATCH v2] " Gabriel Beauchamp
@ 2019-06-30 16:56     ` Gabriel Beauchamp
  2019-07-01 13:41       ` kbuild test robot
                         ` (4 more replies)
  2019-07-01  6:48     ` [PATCH v2] " Greg KH
  1 sibling, 5 replies; 11+ messages in thread
From: Gabriel Beauchamp @ 2019-06-30 16:56 UTC (permalink / raw)
  To: gregkh, christian.gromm, colin.king, gustavo, joe
  Cc: devel, linux-kernel, Gabriel Beauchamp

This is a patch for the core.[ch] files that fixes up warnings
found with the checkpatch.pl tool.

Signed-off-by: Gabriel Beauchamp <beauchampgabriel@gmail.com>
---
Changes in v3:
- add a break statement to preserve the control flow
Changes in v2:
- use a single snprintf
---
 drivers/staging/most/core.c | 11 ++++++++---
 drivers/staging/most/core.h |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index 86a8545c8d97..eb18d4df8ad1 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -299,13 +299,17 @@ static ssize_t set_datatype_show(struct device *dev,
 				 char *buf)
 {
 	int i;
+	char *type = "unconfigured\n";
+
 	struct most_channel *c = to_channel(dev);
 
 	for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
-		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type)
-			return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name);
+		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type) {
+			type = ch_data_type[i].name;
+			break;
+		}
 	}
-	return snprintf(buf, PAGE_SIZE, "unconfigured\n");
+	return snprintf(buf, PAGE_SIZE, "%s", type);
 }
 
 static ssize_t set_subbuffer_size_show(struct device *dev,
@@ -728,6 +732,7 @@ int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
 
 	return link_channel_to_component(c, comp, link_name, comp_param);
 }
+
 /**
  * remove_link_store - store function for remove_link attribute
  * @drv: device driver
diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h
index 652aaa771029..6ba7c2b34c1c 100644
--- a/drivers/staging/most/core.h
+++ b/drivers/staging/most/core.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * most.h - API for component and adapter drivers
  *
-- 
2.21.0


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

* Re: [PATCH v2] Staging: most: fix coding style issues
  2019-06-30 15:27   ` [PATCH v2] " Gabriel Beauchamp
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
@ 2019-07-01  6:48     ` Greg KH
  1 sibling, 0 replies; 11+ messages in thread
From: Greg KH @ 2019-07-01  6:48 UTC (permalink / raw)
  To: Gabriel Beauchamp
  Cc: christian.gromm, colin.king, gustavo, joe, devel, linux-kernel

On Sun, Jun 30, 2019 at 08:27:26AM -0700, Gabriel Beauchamp wrote:
> This is a patch for the core.[ch] files that fixes up warnings
> found with the checkpatch.pl tool.
> 
> Signed-off-by: Gabriel Beauchamp <beauchampgabriel@gmail.com>

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH v3] Staging: most: fix coding style issues
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
@ 2019-07-01 13:41       ` kbuild test robot
  2019-07-01 17:40       ` kbuild test robot
                         ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2019-07-01 13:41 UTC (permalink / raw)
  To: Gabriel Beauchamp
  Cc: kbuild-all, gregkh, christian.gromm, colin.king, gustavo, joe,
	devel, linux-kernel, Gabriel Beauchamp

[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

Hi Gabriel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v5.2-rc6 next-20190625]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Gabriel-Beauchamp/Staging-most-fix-coding-style-issues/20190701-203804
config: i386-randconfig-x074-201926 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-9) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/staging/most/core.c: In function 'set_datatype_show':
>> drivers/staging/most/core.c:308:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
       type = ch_data_type[i].name;
            ^

vim +/const +308 drivers/staging/most/core.c

   296	
   297	static ssize_t set_datatype_show(struct device *dev,
   298					 struct device_attribute *attr,
   299					 char *buf)
   300	{
   301		int i;
   302		char *type = "unconfigured\n";
   303	
   304		struct most_channel *c = to_channel(dev);
   305	
   306		for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
   307			if (c->cfg.data_type & ch_data_type[i].most_ch_data_type) {
 > 308				type = ch_data_type[i].name;
   309				break;
   310			}
   311		}
   312		return snprintf(buf, PAGE_SIZE, "%s", type);
   313	}
   314	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31988 bytes --]

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

* Re: [PATCH v3] Staging: most: fix coding style issues
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
  2019-07-01 13:41       ` kbuild test robot
@ 2019-07-01 17:40       ` kbuild test robot
  2019-07-02 12:24       ` [PATCH v4] " Gabriel Beauchamp
                         ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2019-07-01 17:40 UTC (permalink / raw)
  To: Gabriel Beauchamp
  Cc: kbuild-all, gregkh, christian.gromm, colin.king, gustavo, joe,
	devel, linux-kernel, Gabriel Beauchamp

Hi Gabriel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v5.2-rc6 next-20190625]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Gabriel-Beauchamp/Staging-most-fix-coding-style-issues/20190701-203804
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)


vim +308 drivers/staging/most/core.c

   296	
   297	static ssize_t set_datatype_show(struct device *dev,
   298					 struct device_attribute *attr,
   299					 char *buf)
   300	{
   301		int i;
   302		char *type = "unconfigured\n";
   303	
   304		struct most_channel *c = to_channel(dev);
   305	
   306		for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
   307			if (c->cfg.data_type & ch_data_type[i].most_ch_data_type) {
 > 308				type = ch_data_type[i].name;
   309				break;
   310			}
   311		}
   312		return snprintf(buf, PAGE_SIZE, "%s", type);
   313	}
   314	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH v4] Staging: most: fix coding style issues
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
  2019-07-01 13:41       ` kbuild test robot
  2019-07-01 17:40       ` kbuild test robot
@ 2019-07-02 12:24       ` Gabriel Beauchamp
  2019-07-02 12:28         ` Greg KH
  2019-07-23 13:43       ` [PATCH v3] " kbuild test robot
  2019-08-08 14:23       ` kbuild test robot
  4 siblings, 1 reply; 11+ messages in thread
From: Gabriel Beauchamp @ 2019-07-02 12:24 UTC (permalink / raw)
  To: gregkh, christian.gromm, colin.king, gustavo, joe
  Cc: devel, linux-kernel, Gabriel Beauchamp

This is a patch for the core.[ch] files that fixes up warnings
found with the checkpatch.pl tool.

Signed-off-by: Gabriel Beauchamp <beauchampgabriel@gmail.com>
---
Changes in v4:
- fix a warning by making '*type' const
Changes in v3:
- add a break statement to preserve the control flow
Changes in v2:
- use a single snprintf
---
 drivers/staging/most/core.c | 11 ++++++++---
 drivers/staging/most/core.h |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index 86a8545c8d97..6a50e3090178 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -299,13 +299,17 @@ static ssize_t set_datatype_show(struct device *dev,
 				 char *buf)
 {
 	int i;
+	const char *type = "unconfigured\n";
+
 	struct most_channel *c = to_channel(dev);
 
 	for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
-		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type)
-			return snprintf(buf, PAGE_SIZE, "%s", ch_data_type[i].name);
+		if (c->cfg.data_type & ch_data_type[i].most_ch_data_type) {
+			type = ch_data_type[i].name;
+			break;
+		}
 	}
-	return snprintf(buf, PAGE_SIZE, "unconfigured\n");
+	return snprintf(buf, PAGE_SIZE, "%s", type);
 }
 
 static ssize_t set_subbuffer_size_show(struct device *dev,
@@ -728,6 +732,7 @@ int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
 
 	return link_channel_to_component(c, comp, link_name, comp_param);
 }
+
 /**
  * remove_link_store - store function for remove_link attribute
  * @drv: device driver
diff --git a/drivers/staging/most/core.h b/drivers/staging/most/core.h
index 652aaa771029..6ba7c2b34c1c 100644
--- a/drivers/staging/most/core.h
+++ b/drivers/staging/most/core.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * most.h - API for component and adapter drivers
  *
-- 
2.21.0


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

* Re: [PATCH v4] Staging: most: fix coding style issues
  2019-07-02 12:24       ` [PATCH v4] " Gabriel Beauchamp
@ 2019-07-02 12:28         ` Greg KH
  0 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2019-07-02 12:28 UTC (permalink / raw)
  To: Gabriel Beauchamp
  Cc: christian.gromm, colin.king, gustavo, joe, devel, linux-kernel

On Tue, Jul 02, 2019 at 05:24:03AM -0700, Gabriel Beauchamp wrote:
> This is a patch for the core.[ch] files that fixes up warnings
> found with the checkpatch.pl tool.
> 
> Signed-off-by: Gabriel Beauchamp <beauchampgabriel@gmail.com>

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re: [PATCH v3] Staging: most: fix coding style issues
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
                         ` (2 preceding siblings ...)
  2019-07-02 12:24       ` [PATCH v4] " Gabriel Beauchamp
@ 2019-07-23 13:43       ` kbuild test robot
  2019-08-08 14:23       ` kbuild test robot
  4 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2019-07-23 13:43 UTC (permalink / raw)
  To: Gabriel Beauchamp
  Cc: kbuild-all, gregkh, christian.gromm, colin.king, gustavo, joe,
	devel, linux-kernel, Gabriel Beauchamp

Hi Gabriel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[cannot apply to v5.3-rc1 next-20190723]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Gabriel-Beauchamp/Staging-most-fix-coding-style-issues/20190701-203804
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/most/core.c:308:30: sparse: sparse: incorrect type in assignment (different modifiers) @@    expected char *type @@    got char const *char *type @@
>> drivers/staging/most/core.c:308:30: sparse:    expected char *type
>> drivers/staging/most/core.c:308:30: sparse:    got char const *const name

vim +308 drivers/staging/most/core.c

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* Re: [PATCH v3] Staging: most: fix coding style issues
  2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
                         ` (3 preceding siblings ...)
  2019-07-23 13:43       ` [PATCH v3] " kbuild test robot
@ 2019-08-08 14:23       ` kbuild test robot
  4 siblings, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2019-08-08 14:23 UTC (permalink / raw)
  To: Gabriel Beauchamp
  Cc: kbuild-all, gregkh, christian.gromm, colin.king, gustavo, joe,
	devel, linux-kernel, Gabriel Beauchamp

Hi Gabriel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[cannot apply to v5.3-rc3 next-20190808]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Gabriel-Beauchamp/Staging-most-fix-coding-style-issues/20190701-203804
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/staging/most/core.c:308:30: sparse: sparse: incorrect type in assignment (different modifiers) @@    expected char *type @@    got char const *char *type @@
>> drivers/staging/most/core.c:308:30: sparse:    expected char *type
>> drivers/staging/most/core.c:308:30: sparse:    got char const *const name

vim +308 drivers/staging/most/core.c

   296	
   297	static ssize_t set_datatype_show(struct device *dev,
   298					 struct device_attribute *attr,
   299					 char *buf)
   300	{
   301		int i;
   302		char *type = "unconfigured\n";
   303	
   304		struct most_channel *c = to_channel(dev);
   305	
   306		for (i = 0; i < ARRAY_SIZE(ch_data_type); i++) {
   307			if (c->cfg.data_type & ch_data_type[i].most_ch_data_type) {
 > 308				type = ch_data_type[i].name;
   309				break;
   310			}
   311		}
   312		return snprintf(buf, PAGE_SIZE, "%s", type);
   313	}
   314	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

end of thread, other threads:[~2019-08-08 14:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-29 23:44 [PATCH] Staging: most: fix coding style issues Gabriel Beauchamp
2019-06-29 23:58 ` Joe Perches
2019-06-30 15:27   ` [PATCH v2] " Gabriel Beauchamp
2019-06-30 16:56     ` [PATCH v3] " Gabriel Beauchamp
2019-07-01 13:41       ` kbuild test robot
2019-07-01 17:40       ` kbuild test robot
2019-07-02 12:24       ` [PATCH v4] " Gabriel Beauchamp
2019-07-02 12:28         ` Greg KH
2019-07-23 13:43       ` [PATCH v3] " kbuild test robot
2019-08-08 14:23       ` kbuild test robot
2019-07-01  6:48     ` [PATCH v2] " Greg KH

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).