mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Remove explicit return type cast
@ 2017-08-02 12:51 Hari Prasath
  2017-08-03  6:22 ` kbuild test robot
  0 siblings, 1 reply; 5+ messages in thread
From: Hari Prasath @ 2017-08-02 12:51 UTC (permalink / raw)
  To: linux
  Cc: gehariprasath, Greg Kroah-Hartman, Joseph Wright, Colin Ian King,
	Derek Robson, dan.carpenter, devel, linux-kernel

Remove explicit typecasting of return value in the interrupt handlers.

Signed-off-by: Hari Prasath <gehariprasath@gmail.com>
---
 drivers/staging/pi433/pi433_if.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index ed737f4..95f3ef9 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -151,7 +151,7 @@ DIO0_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
 		wake_up_interruptible(&device->fifo_wait_queue);
 	}
 
-	return (irq_handler_t) IRQ_HANDLED;
+	return IRQ_HANDLED;
 }
 
 static irq_handler_t
@@ -171,7 +171,7 @@ DIO1_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
 	printk("DIO1 irq: %d bytes free in fifo\n", device->free_in_fifo); // TODO: printk() should include KERN_ facility level
 	wake_up_interruptible(&device->fifo_wait_queue);
 
-	return (irq_handler_t) IRQ_HANDLED;
+	return IRQ_HANDLED;
 }
 
 static void *DIO_irq_handler[NUM_DIO] = {
-- 
2.10.0.GIT

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

* Re: [PATCH] Remove explicit return type cast
  2017-08-02 12:51 [PATCH] Remove explicit return type cast Hari Prasath
@ 2017-08-03  6:22 ` kbuild test robot
  2017-08-03 12:53   ` hari prasath
  0 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2017-08-03  6:22 UTC (permalink / raw)
  To: Hari Prasath
  Cc: kbuild-all, linux, devel, Derek Robson, Greg Kroah-Hartman,
	linux-kernel, Joseph Wright, Colin Ian King, dan.carpenter

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

Hi Hari,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20170802]
[cannot apply to v4.13-rc3]
[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/Hari-Prasath/Remove-explicit-return-type-cast/20170803-080312
config: blackfin-allyesconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

All warnings (new ones prefixed by >>):

   drivers/staging/pi433/pi433_if.c: In function 'DIO0_irq_handler':
>> drivers/staging/pi433/pi433_if.c:154:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return IRQ_HANDLED;
            ^~~~~~~~~~~
   drivers/staging/pi433/pi433_if.c: In function 'DIO1_irq_handler':
   drivers/staging/pi433/pi433_if.c:174:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return IRQ_HANDLED;
            ^~~~~~~~~~~

vim +154 drivers/staging/pi433/pi433_if.c

   129	
   130	/* GPIO interrupt handlers */
   131	static irq_handler_t
   132	DIO0_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
   133	{
   134		struct pi433_device *device = dev_id;
   135	
   136		if      (device->irq_state[DIO0] == DIO_PacketSent)
   137		{
   138			device->free_in_fifo = FIFO_SIZE;
   139			printk("DIO0 irq: Packet sent\n"); // TODO: printk() should include KERN_ facility level
   140			wake_up_interruptible(&device->fifo_wait_queue);
   141		}
   142		else if (device->irq_state[DIO0] == DIO_Rssi_DIO0)
   143		{
   144			printk("DIO0 irq: RSSI level over threshold\n");
   145			wake_up_interruptible(&device->rx_wait_queue);
   146		}
   147		else if (device->irq_state[DIO0] == DIO_PayloadReady)
   148		{
   149			printk("DIO0 irq: PayloadReady\n");
   150			device->free_in_fifo = 0;
   151			wake_up_interruptible(&device->fifo_wait_queue);
   152		}
   153	
 > 154		return IRQ_HANDLED;
   155	}
   156	

---
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: 45708 bytes --]

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

* Re: [PATCH] Remove explicit return type cast
  2017-08-03  6:22 ` kbuild test robot
@ 2017-08-03 12:53   ` hari prasath
  2017-08-03 13:23     ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: hari prasath @ 2017-08-03 12:53 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, linux, devel, Derek Robson, Greg Kroah-Hartman,
	linux-kernel, Joseph Wright, Colin Ian King, dan.carpenter

On 3 August 2017 at 11:52, kbuild test robot <lkp@intel.com> wrote:
> Hi Hari,
>
> [auto build test WARNING on staging/staging-testing]
> [also build test WARNING on next-20170802]
> [cannot apply to v4.13-rc3]
> [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/Hari-Prasath/Remove-explicit-return-type-cast/20170803-080312
> config: blackfin-allyesconfig (attached as .config)
> compiler: bfin-uclinux-gcc (GCC) 6.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=blackfin
>

>> I tried these steps, it's giving me build error as below.

  CC      security/selinux/exports.o
  CC      security/apparmor/file.o
fs/ubifs/lpt_commit.c: In function 'next_pnode_to_dirty':
fs/ubifs/lpt_commit.c:617:1: internal compiler error: in
bfin_optimize_loop, at config/bfin/bfin.c:3978
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
scripts/Makefile.build:302: recipe for target 'fs/ubifs/lpt_commit.o' failed
make[2]: *** [fs/ubifs/lpt_commit.o] Error 1
make[2]: *** Waiting for unfinished jobs....



> All warnings (new ones prefixed by >>):
>
>    drivers/staging/pi433/pi433_if.c: In function 'DIO0_irq_handler':
>>> drivers/staging/pi433/pi433_if.c:154:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
>      return IRQ_HANDLED;
>             ^~~~~~~~~~~
>    drivers/staging/pi433/pi433_if.c: In function 'DIO1_irq_handler':
>    drivers/staging/pi433/pi433_if.c:174:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
>      return IRQ_HANDLED;
>             ^~~~~~~~~~~
>
> vim +154 drivers/staging/pi433/pi433_if.c
>
>    129
>    130  /* GPIO interrupt handlers */
>    131  static irq_handler_t
>    132  DIO0_irq_handler(unsigned int irq, void *dev_id, struct pt_regs *regs)
>    133  {
>    134          struct pi433_device *device = dev_id;
>    135
>    136          if      (device->irq_state[DIO0] == DIO_PacketSent)
>    137          {
>    138                  device->free_in_fifo = FIFO_SIZE;
>    139                  printk("DIO0 irq: Packet sent\n"); // TODO: printk() should include KERN_ facility level
>    140                  wake_up_interruptible(&device->fifo_wait_queue);
>    141          }
>    142          else if (device->irq_state[DIO0] == DIO_Rssi_DIO0)
>    143          {
>    144                  printk("DIO0 irq: RSSI level over threshold\n");
>    145                  wake_up_interruptible(&device->rx_wait_queue);
>    146          }
>    147          else if (device->irq_state[DIO0] == DIO_PayloadReady)
>    148          {
>    149                  printk("DIO0 irq: PayloadReady\n");
>    150                  device->free_in_fifo = 0;
>    151                  wake_up_interruptible(&device->fifo_wait_queue);
>    152          }
>    153
>  > 154          return IRQ_HANDLED;
>    155  }
>    156
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



-- 
Regards,
G.E.Hari Prasath

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

* Re: [PATCH] Remove explicit return type cast
  2017-08-03 12:53   ` hari prasath
@ 2017-08-03 13:23     ` Dan Carpenter
  2017-08-08 12:59       ` hari prasath
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2017-08-03 13:23 UTC (permalink / raw)
  To: hari prasath
  Cc: kbuild test robot, devel, Derek Robson, Greg Kroah-Hartman,
	linux-kernel, Joseph Wright, linux, kbuild-all, Colin Ian King

On Thu, Aug 03, 2017 at 06:23:54PM +0530, hari prasath wrote:
> On 3 August 2017 at 11:52, kbuild test robot <lkp@intel.com> wrote:
> > Hi Hari,
> >
> > [auto build test WARNING on staging/staging-testing]
> > [also build test WARNING on next-20170802]
> > [cannot apply to v4.13-rc3]
> > [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/Hari-Prasath/Remove-explicit-return-type-cast/20170803-080312
> > config: blackfin-allyesconfig (attached as .config)
> > compiler: bfin-uclinux-gcc (GCC) 6.2.0
> > reproduce:
> >         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # save the attached .config to linux build tree
> >         make.cross ARCH=blackfin
> >
> 
> >> I tried these steps, it's giving me build error as below.
> 

You don't need to cross compile on blackfin to get the warning.  Just
use the normal compiler.

regards,
dan carpenter

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

* Re: [PATCH] Remove explicit return type cast
  2017-08-03 13:23     ` Dan Carpenter
@ 2017-08-08 12:59       ` hari prasath
  0 siblings, 0 replies; 5+ messages in thread
From: hari prasath @ 2017-08-08 12:59 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: kbuild test robot, devel, Derek Robson, Greg Kroah-Hartman,
	linux-kernel, Joseph Wright, linux, kbuild-all, Colin Ian King

On 3 August 2017 at 18:53, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Thu, Aug 03, 2017 at 06:23:54PM +0530, hari prasath wrote:
>> On 3 August 2017 at 11:52, kbuild test robot <lkp@intel.com> wrote:
>> > Hi Hari,
>> >
>> > [auto build test WARNING on staging/staging-testing]
>> > [also build test WARNING on next-20170802]
>> > [cannot apply to v4.13-rc3]
>> > [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/Hari-Prasath/Remove-explicit-return-type-cast/20170803-080312
>> > config: blackfin-allyesconfig (attached as .config)
>> > compiler: bfin-uclinux-gcc (GCC) 6.2.0
>> > reproduce:
>> >         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>> >         chmod +x ~/bin/make.cross
>> >         # save the attached .config to linux build tree
>> >         make.cross ARCH=blackfin
>> >
>>
>> >> I tried these steps, it's giving me build error as below.
>>
>
> You don't need to cross compile on blackfin to get the warning.  Just
> use the normal compiler.
>
> regards,
> dan carpenter
>

> Sorry, I had sent the patch in a hurry. Yes the warning is true. I will try to come up with a v2 of the patch without any warnings. As of now this can be discarded.
>  thanks,
>  hari prasath



-- 
Regards,
G.E.Hari Prasath

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

end of thread, other threads:[~2017-08-08 13:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 12:51 [PATCH] Remove explicit return type cast Hari Prasath
2017-08-03  6:22 ` kbuild test robot
2017-08-03 12:53   ` hari prasath
2017-08-03 13:23     ` Dan Carpenter
2017-08-08 12:59       ` hari prasath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®