Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1617491 > unrolled thread

linux-next: build warning after merge of the scsi tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2017-04-06 06:10 +0200
Last post2017-04-06 10:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: build warning after merge of the scsi tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-04-06 06:10 +0200
    Re: linux-next: build warning after merge of the scsi tree Fam Zheng <famz@redhat.com> - 2017-04-06 10:20 +0200

#1617491 — linux-next: build warning after merge of the scsi tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-04-06 06:10 +0200
Subjectlinux-next: build warning after merge of the scsi tree
Message-ID<tt6U9-3vf-11@gated-at.bofh.it>
Hi James,

After merging the scsi tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

In file included from include/linux/list.h:8:0,
                 from include/linux/module.h:9,
                 from drivers/scsi/sd.c:35:
drivers/scsi/sd.c: In function 'sd_revalidate_disk':
include/linux/kernel.h:755:16: warning: comparison of distinct pointer types lacks a cast
  (void) (&min1 == &min2);   \
                ^
include/linux/kernel.h:758:2: note: in expansion of macro '__min'
  __min(typeof(x), typeof(y),   \
  ^
include/linux/kernel.h:783:39: note: in expansion of macro 'min'
  __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
                                       ^
drivers/scsi/sd.c:2959:12: note: in expansion of macro 'min_not_zero'
   rw_max = min_not_zero(logical_to_sectors(sdp, dev_max),
            ^

Introduced by commit

  c3e62673ee20 ("scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable")

logical_to_sectors() is a sector_t and BLK_DEF_MAX_SECTORS is an "enum
blk_default_limits" (i.e. int).

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1617580

FromFam Zheng <famz@redhat.com>
Date2017-04-06 10:20 +0200
Message-ID<ttaO5-60K-1@gated-at.bofh.it>
In reply to#1617491
On Thu, 04/06 14:04, Stephen Rothwell wrote:
> Hi James,
> 
> After merging the scsi tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> In file included from include/linux/list.h:8:0,
>                  from include/linux/module.h:9,
>                  from drivers/scsi/sd.c:35:
> drivers/scsi/sd.c: In function 'sd_revalidate_disk':
> include/linux/kernel.h:755:16: warning: comparison of distinct pointer types lacks a cast
>   (void) (&min1 == &min2);   \
>                 ^
> include/linux/kernel.h:758:2: note: in expansion of macro '__min'
>   __min(typeof(x), typeof(y),   \
>   ^
> include/linux/kernel.h:783:39: note: in expansion of macro 'min'
>   __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })
>                                        ^
> drivers/scsi/sd.c:2959:12: note: in expansion of macro 'min_not_zero'
>    rw_max = min_not_zero(logical_to_sectors(sdp, dev_max),
>             ^
> 
> Introduced by commit
> 
>   c3e62673ee20 ("scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable")
> 
> logical_to_sectors() is a sector_t and BLK_DEF_MAX_SECTORS is an "enum
> blk_default_limits" (i.e. int).

Hi Stephen, James,

I will send a patch to fix this warning.

Fam

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web