Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9320716imu; Sat, 29 Dec 2018 16:23:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/UdvnFLROgmotbOuwHzvKGtIucUjsGJm33aKOvohqklmWfIfNVTPEirVkyNdfqU69Mgp1Aw X-Received: by 2002:a62:3943:: with SMTP id g64mr33722625pfa.114.1546129436296; Sat, 29 Dec 2018 16:23:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546129436; cv=none; d=google.com; s=arc-20160816; b=WZ6c45bSNzJIbp5vNvtJFSATBDoyIxerDC2x0gmHgiGlUtR1KBqciYDlBSPmXeeFHy lzo7E+K535C1HmFI+GCOjNg01sSNjUKQBrrcUCjxWTbPWS2eD5USfrJ9KBucEv+YFCeW P8sE3GJBzaMHMKRLjiDRpYF/jqd1TDmkR9z2CC0Fh6jB0PXd+QUeJGmDPK3mb1WHpDsD nT15VRYaqK2WwJPs/mUz0mTsKnTmdQuLgyJUclY2GrOV/e8l+BBXqAMf+I40LGxzTjsc eBQzlHZUBZtie6a8FLNT6e7H7xd5el4ACpt/W1nGNM4h8qKn6hglF/UzYjoRyaoWH6Gz TZcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:user-agent:in-reply-to:references :subject:cc:to:from:message-id:date; bh=XIS4+KQPOrHClwT16hoYCHpcrzFO6AM7kgvlpDCQjqY=; b=Bv3YPJ/6rpl6eoRepBktizD42JScRKRMIogiaoKgr4j8hhSWm6Vdc97ZaqMHgqJJnv LTDYHJeaVigyQpHaPAuK2kwFzjwy61IiQeu5BOS4BtK7TGkXXgyCv4v6WSiyjFRBNDyH eo9cFDrsysUi9Oy4uXMeda4jBKVQQpxcwQgbybpBfXuidk310BgTpL4+onDUg53utmXK gzd2FUDJJoFPUzn53fSLze8b3y9waFGpPKUxveh26Dt8YhSnXsUauscpIgYinpWjP5+7 WkFfIlZ1us4d/H3uVO7eL7Y6URiqPrltC9IVqU4Krf+NEyVnxSccPNCQoz4Quvgr4cHd Ym/Q== 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 u13si39143300plq.268.2018.12.29.16.23.41; Sat, 29 Dec 2018 16:23:56 -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 S1727478AbeL2QzG convert rfc822-to-8bit (ORCPT + 99 others); Sat, 29 Dec 2018 11:55:06 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:44915 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbeL2QzF (ORCPT ); Sat, 29 Dec 2018 11:55:05 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43RqSN4t94z9txrB; Sat, 29 Dec 2018 17:55:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id da60WTjGdypm; Sat, 29 Dec 2018 17:55:00 +0100 (CET) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 43RqSN4Crgz9txr6; Sat, 29 Dec 2018 17:55:00 +0100 (CET) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 5B66463B; Sat, 29 Dec 2018 17:55:02 +0100 (CET) Received: from 37.164.147.219 ([37.164.147.219]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Sat, 29 Dec 2018 17:55:02 +0100 Date: Sat, 29 Dec 2018 17:55:02 +0100 Message-ID: <20181229175502.Horde.OaGr035vfDpvlvNGdmoaOQ2@messagerie.si.c-s.fr> From: LEROY Christophe To: Michael Schmitz Cc: Arnd Bergmann , Greg Kroah-Hartman , "James E.J. Bottomley" , "Martin K. Petersen" , linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Finn Thain Subject: Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM References: <20181228173846.Horde.z_zDEJN0rVd8tkt3HjYzmg2@messagerie.si.c-s.fr> In-Reply-To: User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael Schmitz a écrit : > Hi Finn, > > Am 29.12.2018 um 14:06 schrieb Finn Thain: >> On Fri, 28 Dec 2018, LEROY Christophe wrote: >>>> diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c >>>> index 89f5154c40b6..99e5729d910d 100644 >>>> --- a/drivers/scsi/atari_scsi.c >>>> +++ b/drivers/scsi/atari_scsi.c >>>> @@ -755,9 +755,10 @@ static int __init atari_scsi_probe(struct >>>> platform_device *pdev) >>>> if (ATARIHW_PRESENT(TT_SCSI) && setup_sg_tablesize >= 0) >>>> atari_scsi_template.sg_tablesize = setup_sg_tablesize; >>>> >>>> - if (setup_hostid >= 0) { >>>> + if (setup_hostid >= 0) >>>> atari_scsi_template.this_id = setup_hostid & 7; >>>> - } else { >>>> +#ifdef CONFIG_NVRAM >>>> + else >>> >>> Such ifdefs should be avoided in C files. >>> It would be better to use >>> >>> } else if (IS_ENABLED(CONFIG_NVRAM)) { >>> >> >> I don't like #ifdefs either. However, as the maintainer of this file, I am >> okay with this one. >> >> The old #ifdef CONFIG_NVRAM conditional compilation convention that gets >> used here and under drivers/video/fbdev could probably be improved upon >> but I consider this to be out-of-scope for this series, which is >> complicated enough. >> >> And as explained in the commit log, CONFIG_NVRAM=y and CONFIG_NVRAM=m are >> treaded differently by drivers. Therefore, IS_ENABLED would be incorrect. > > IS_BUILTIN(CONFIG_NVRAM) is probably what Christophe really meant to suggest. Doesn't #ifdef means either y or m ? So the same as IS_ENABLED() ? Christophe > > Or (really going out on a limb here): > > IS_BUILTIN(CONFIG_NVRAM) || > ( IS_MODULE(CONFIG_ATARI_SCSI) && IS_ENABLED(CONFIG_NVRAM) ) > > Not that I'd advocate that, for this series. > > Cheers, > > Michael