linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] m32r: fix build warning about putc
@ 2016-06-26 21:16 Sudip Mukherjee
  2016-06-27  3:48 ` kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: Sudip Mukherjee @ 2016-06-26 21:16 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Sudip Mukherjee

We were getting build warning:
arch/m32r/boot/compressed/m32r_sio.c:11:13:
        warning: conflicting types for built-in function 'putc'

Here putc is used as a static function so lets just rename it to avoid
the conflict with the builtin putc.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

build log is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/139958498

 arch/m32r/boot/compressed/m32r_sio.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c
index 01d877c..e5c0c60 100644
--- a/arch/m32r/boot/compressed/m32r_sio.c
+++ b/arch/m32r/boot/compressed/m32r_sio.c
@@ -8,12 +8,13 @@
 
 #include <asm/processor.h>
 
-static void putc(char c);
+static void m32r_putc(char c);
 
 static int puts(const char *s)
 {
 	char c;
-	while ((c = *s++)) putc(c);
+	while (c = *s++)
+		m32r_putc(c);
 	return 0;
 }
 
@@ -41,7 +42,7 @@ static int puts(const char *s)
 #define BOOT_SIO0TXB	PLD_ESIO0TXB
 #endif
 
-static void putc(char c)
+static void m32r_putc(char c)
 {
 	while ((*BOOT_SIO0STS & 0x3) != 0x3)
 		cpu_relax();
@@ -61,7 +62,7 @@ static void putc(char c)
 #define SIO0TXB	(volatile unsigned short *)(0x00efd000 + 30)
 #endif
 
-static void putc(char c)
+static void m32r_putc(char c)
 {
 	while ((*SIO0STS & 0x1) == 0)
 		cpu_relax();
-- 
1.9.1

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

* Re: [PATCH] m32r: fix build warning about putc
  2016-06-26 21:16 [PATCH] m32r: fix build warning about putc Sudip Mukherjee
@ 2016-06-27  3:48 ` kbuild test robot
  2016-06-28 21:29   ` Sudip Mukherjee
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2016-06-27  3:48 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: kbuild-all, Andrew Morton, linux-kernel, Sudip Mukherjee

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

Hi,

[auto build test WARNING on v4.7-rc5]
[also build test WARNING on next-20160624]
[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/Sudip-Mukherjee/m32r-fix-build-warning-about-putc/20160627-094312
config: m32r-m32104ut_defconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m32r 

All warnings (new ones prefixed by >>):

   In file included from arch/m32r/boot/compressed/misc.c:25:0:
   arch/m32r/boot/compressed/m32r_sio.c: In function 'puts':
>> arch/m32r/boot/compressed/m32r_sio.c:16:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     while (c = *s++)
     ^

vim +16 arch/m32r/boot/compressed/m32r_sio.c

     1	/*
     2	 * arch/m32r/boot/compressed/m32r_sio.c
     3	 *
     4	 * 2003-02-12:	Takeo Takahashi
     5	 * 2006-11-30:	OPSPUT support by Kazuhiro Inaoka
     6	 *
     7	 */
     8	
     9	#include <asm/processor.h>
    10	
    11	static void m32r_putc(char c);
    12	
    13	static int puts(const char *s)
    14	{
    15		char c;
  > 16		while (c = *s++)
    17			m32r_putc(c);
    18		return 0;
    19	}
    20	
    21	#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT)
    22	#include <asm/m32r.h>
    23	#include <asm/io.h>
    24	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 10696 bytes --]

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

* Re: [PATCH] m32r: fix build warning about putc
  2016-06-27  3:48 ` kbuild test robot
@ 2016-06-28 21:29   ` Sudip Mukherjee
  0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2016-06-28 21:29 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, Andrew Morton, linux-kernel

On Monday 27 June 2016 04:48 AM, kbuild test robot wrote:
> Hi,
>
> [auto build test WARNING on v4.7-rc5]
> [also build test WARNING on next-20160624]
> [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/Sudip-Mukherjee/m32r-fix-build-warning-about-putc/20160627-094312
> config: m32r-m32104ut_defconfig (attached as .config)
> compiler: m32r-linux-gcc (GCC) 4.9.0
> reproduce:
>          wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>          chmod +x ~/bin/make.cross
>          # save the attached .config to linux build tree
>          make.cross ARCH=m32r
>
> All warnings (new ones prefixed by >>):
>
>     In file included from arch/m32r/boot/compressed/misc.c:25:0:
>     arch/m32r/boot/compressed/m32r_sio.c: In function 'puts':
>>> arch/m32r/boot/compressed/m32r_sio.c:16:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
>       while (c = *s++)
>       ^

This was fixed in v2 which was sent just after this patch was posted.


Regards
Sudip

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

end of thread, other threads:[~2016-06-28 21:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-26 21:16 [PATCH] m32r: fix build warning about putc Sudip Mukherjee
2016-06-27  3:48 ` kbuild test robot
2016-06-28 21:29   ` Sudip Mukherjee

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