From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbcLGNWf (ORCPT ); Wed, 7 Dec 2016 08:22:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46479 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752013AbcLGNWb (ORCPT ); Wed, 7 Dec 2016 08:22:31 -0500 Date: Wed, 7 Dec 2016 15:22:14 +0200 From: "Michael S. Tsirkin" To: Johannes Berg Cc: linux-kernel@vger.kernel.org, Jason Wang , linux-kbuild@vger.kernel.org, Michal Marek , Arnd Bergmann , Greg Kroah-Hartman , Matt Mackall , Herbert Xu , David Airlie , Gerd Hoffmann , Ohad Ben-Cohen , Christian Borntraeger , Cornelia Huck , "James E.J. Bottomley" , "David S. Miller" , Jens Axboe , Neil Armstrong , Stefan Hajnoczi , Asias He , linux-crypto@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-scsi@vger.kernel.org, v9fs-developer@lists.sourceforge.net Subject: Re: [PATCH 10/10] virtio: enable endian checks for sparse builds Message-ID: <20161207152131-mutt-send-email-mst@kernel.org> References: <1481038106-24899-1-git-send-email-mst@redhat.com> <1481038106-24899-11-git-send-email-mst@redhat.com> <1481091951.4092.12.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1481091951.4092.12.camel@sipsolutions.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 07 Dec 2016 13:22:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 07, 2016 at 07:25:51AM +0100, Johannes Berg wrote: > On Tue, 2016-12-06 at 17:41 +0200, Michael S. Tsirkin wrote: > > > It seems that there should be a better way to do it, > > but this works too. > > In some cases there might be: > > > --- a/drivers/s390/virtio/Makefile > > +++ b/drivers/s390/virtio/Makefile > > @@ -6,6 +6,8 @@ > >  # it under the terms of the GNU General Public License (version 2 > > only) > >  # as published by the Free Software Foundation. > >   > > +CFLAGS_virtio_ccw.o += -D__CHECK_ENDIAN__ > > +CFLAGS_kvm_virtio.o += -D__CHECK_ENDIAN__ > >  s390-virtio-objs := virtio_ccw.o > >  ifdef CONFIG_S390_GUEST_OLD_TRANSPORT > >  s390-virtio-objs += kvm_virtio.o > > Here you could use > > ccflags-y += -D__CHECK_ENDIAN__ > > for example, or even > > subdir-ccflags-y += -D__CHECK_ENDIAN__ > > (in case any subdirs ever get added here) Oh right. I forgot this directory only has virtio stuff. > > --- a/drivers/vhost/Makefile > > +++ b/drivers/vhost/Makefile > > @@ -1,3 +1,4 @@ > > +ccflags-y := -D__CHECK_ENDIAN__ > > Looks like you did that here and in some other places though - so > perhaps the s390 one was intentionally different? > > > --- a/net/packet/Makefile > > +++ b/net/packet/Makefile > > @@ -2,6 +2,7 @@ > >  # Makefile for the packet AF. > >  # > >   > > +ccflags-y := -D__CHECK_ENDIAN__ > > Technically this is slightly more than advertised, but I guess that > still makes sense if it's clean now. > > johannes