Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753627AbdDFITB (ORCPT ); Thu, 6 Apr 2017 04:19:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38866 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226AbdDFIS5 (ORCPT ); Thu, 6 Apr 2017 04:18:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 261EB61976 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=famz@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 261EB61976 Date: Thu, 6 Apr 2017 16:18:54 +0800 From: Fam Zheng To: James Bottomley , Stephen Rothwell Cc: Linux-Next Mailing List , Linux Kernel Mailing List Subject: Re: linux-next: build warning after merge of the scsi tree Message-ID: <20170406073201.GA4618@lemon> References: <20170406140455.0ee0058f@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170406140455.0ee0058f@canb.auug.org.au> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 06 Apr 2017 08:18:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1237 Lines: 35 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