Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10168737imu; Sun, 30 Dec 2018 14:47:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN5rxEYChHSWKbwquuB7j4upB08GN6JM9XkkhhSlTfG2OEDLxEYS5m6aAKf/MEj+oJuIeNy4 X-Received: by 2002:a17:902:bf44:: with SMTP id u4mr25694676pls.5.1546210026342; Sun, 30 Dec 2018 14:47:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546210026; cv=none; d=google.com; s=arc-20160816; b=MDa0ULbKWipYKH3vSUTgBA/qrBaAFQw3RNrPHSDEVZyKM5X3FrrAShfwhLjz1fWTCh f3g820mkoPa7txP/Ol4SuLU1+IzvS2zwiGAnnXiCa6LD34/NR/Ru1OeVFdEEJ0H3A5n+ DgSTmJFeYmmA4I6WkxgolrXjHrrYTysNx2JIdiwlSjFByvCH/0bg2mIFTo+RgrdA2aWh oQNnGUUOjSrGjls0XGyy6wIGAP0Ckix/NPRQmRWVVX6oMpvg+i1gDRbfzDgL+B5TDYGa YTzueIcfT8jOy1hCSlUODbF80CF0XOvOzRIMIJifVrzJhR5cjlq00FigH1Ku8kdiiY6I OBoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=xDZRnfw53klxr4HAuGq6mynp/6oy28DNOEWGeoDzR28=; b=BNjRvV+Jdop6kf46GBeIYgXHY+Kasjvn1s1TddWgTQRh75ABiidBrh59zytX+SmA72 58tauP4is7w7CKu37hSQjmSgVOU0e6DbM+cwPn0uG+wqmRi8QOb9lLEN7Dp1Np7mpfJ0 3tEVi0AZV4Shk2kxA87gLbsVXU0EnYM+5oSAanT9coVkKLzPOMA5iddqDR1bgFcEbpc+ eChL5Yt+Z2Kq/zDX4Lby06hr2dUzhmk0FEU4D2OOHgkYPA1+Zq2bZGS2La4NSPc7B1mA 3mzhFwWBhaEXe/cN0XDFQWD+sHaWV+hA34IstqeKi6hr/5+0eLUq/+KkSuTgjbJMPCif 4/vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a16si43216094pls.146.2018.12.30.14.46.40; Sun, 30 Dec 2018 14:47:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbeL3WpW (ORCPT + 99 others); Sun, 30 Dec 2018 17:45:22 -0500 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:34502 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726861AbeL3WpW (ORCPT ); Sun, 30 Dec 2018 17:45:22 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 42EE12280E; Sun, 30 Dec 2018 17:45:18 -0500 (EST) Date: Mon, 31 Dec 2018 09:45:16 +1100 (AEDT) From: Finn Thain To: James Bottomley cc: LEROY Christophe , Arnd Bergmann , linuxppc-dev , linux-m68k , Linux Kernel Mailing List , Greg Kroah-Hartman , "Martin K. Petersen" , linux-scsi , Michael Schmitz Subject: Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM In-Reply-To: Message-ID: References: <20181228173846.Horde.z_zDEJN0rVd8tkt3HjYzmg2@messagerie.si.c-s.fr> <5e901432-65e2-c87b-31e3-36a394687a9a@gmail.com> <20181230185002.Horde.AdSknvcs4hP1Kh_T_Cos6w8@messagerie.si.c-s.fr> <1546193203.2844.9.camel@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 31 Dec 2018, Finn Thain wrote: > On Sun, 30 Dec 2018, James Bottomley wrote: > > > > > That said, as has been pointed out, the current #ifdef has a failing > > corner case when both are modular (because the code should then be > > included). The runtime macro that correctly expresses this is > > IS_REACHABLE(CONFIG_NVRAM). > > > > No, in the case of CONFIG_NVRAM=m, the conditional code is deliberately > excluded. This is discussed in the patch description. The convention on > PPC32 is that device drivers drop support for NVRAM in this situation. > > I've adopted the PPC32 convention here because M68K drivers and PPC32 > drivers have to co-exist (I'm thinking of valkyriefb, but there are other > examples). > I agree with your comment in principle, that these drivers should be using IS_REACHABLE(CONFIG_NVRAM), not defined(CONFIG_NVRAM). $ grep -lrw CONFIG_NVRAM drivers/ drivers/video/fbdev/matrox/matroxfb_base.c drivers/video/fbdev/platinumfb.c drivers/video/fbdev/controlfb.c drivers/video/fbdev/valkyriefb.c drivers/video/fbdev/imsttfb.c drivers/scsi/atari_scsi.c $ But I think this is not the fault of this patch; it's just a historical accident. Having said that, I will rework this series to convert all of the above drivers to IS_REACHABLE(CONFIG_NVRAM). I think it would be an improvement. Besides, it seems likely that some rework involving ppc_md will be needed too because as Arnd pointed out, it would be good to avoid two sets of nvram accessor methods. --