Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8831126imu; Sat, 29 Dec 2018 04:48:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN7w7JGrmdNSCQLGblchb8uB8HICUjbOXK1c8w+lhHMM/vwxCbsGQ5oy+xQ96y+ruvN1Lc5g X-Received: by 2002:a17:902:1122:: with SMTP id d31mr31015623pla.246.1546087692394; Sat, 29 Dec 2018 04:48:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546087692; cv=none; d=google.com; s=arc-20160816; b=vx0TFUInB+jegbwk2oB9/AR1Xfak+IpjeDGw4yHQBoCECEo7zzhNloVnmtafZ/kYE2 3tx4foLmPp0SQhGjg10MhgJdaJIuRoNECkR/G/Oyr9g1SbIc4cTN3LNJYmHR6cYzSNVn WYVuqZfkqdXkWzsQi1GWBS/xDoKESOOqpvmySlf1gsDNpaYyT3xRv6DYmwGWZbWq6e7G ME1hkt6QdO5m3mFgHJo1mMs9rF/sBuJJGxbvu/mRkJtsMtkCWK8FAHBXtC99yFpeWxCW 0tMmnn+Pyimoh7H+OJRTDWFdPmibag7hn9p3KL7LIaibeeRCnf3rkxVR4Koxf2bE7pOE lBNQ== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature; bh=0g+71U+dX+QF2iiDoSz5x+9PmsICHaGBbrjNqL+fqJA=; b=D21NWfX/YekQ55oZZagN9uu5v7b/rA3oPptUsurbRbGAqnoTICHq0lWdNki0/HHqh0 Km7t3o/1znw2nQWpE0dTjyG0Y5jRegEI89yryIRnc5/52Uer+2lEveAv6QHVI06pHXUF MPunRDnSJqBiTjULV2cyHW11/zBqewy0+WYTv12uvDpFnqPYSCh2MJElBYoYClk2JWWo R/HtzgV7dTwtRWLY0ep3qVYuLzVWTjZGZjo7Jz6xbXDZRq2aOkFJVDt1OKXM1Ux33t39 tzePoyiZ4zZxOveITqLR477sRIvyd0c4Nw9WxQ0RGvFCp1wYb4h0uYlgXulIbeX7RUPs Tv4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rVGbyG54; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si36901169pgp.348.2018.12.29.04.47.56; Sat, 29 Dec 2018 04:48:12 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rVGbyG54; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728992AbeL2BdN (ORCPT + 99 others); Fri, 28 Dec 2018 20:33:13 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:47019 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728967AbeL2BdL (ORCPT ); Fri, 28 Dec 2018 20:33:11 -0500 Received: by mail-pg1-f196.google.com with SMTP id w7so10642200pgp.13; Fri, 28 Dec 2018 17:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=0g+71U+dX+QF2iiDoSz5x+9PmsICHaGBbrjNqL+fqJA=; b=rVGbyG54LViWSoyiHppDMoeyktkoVpAJAdeBYdHLR/LVmuJR5JfG9XKWydst2M8Hzx tvVUYcMyNMjqu9r0Uic3yOU9XVJb6lz9xUTtVxtQ8nrWltZB5JgZAUzwahCvb+hMutdz 0d+R2JGf9xFxt8xD5iXfVs/CYvmq1dXe4/08pV749JJ+ao3gnvBzXMJS7Wl3t0Tt3pTq NhisMXY7XnEAldBrc9LILyvpSxloWoTj5y0hbyPB3YsfnmlMxWqo+sLTkwM8m7YAdnRN JDmW+PkJsDc5usAwFxu4BzrhBLq0r0R4QWJ5ah4AywrW1lmm1kz2p/9Ubu5TZt5vdyPB rDxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=0g+71U+dX+QF2iiDoSz5x+9PmsICHaGBbrjNqL+fqJA=; b=hHqXTCBZr4rggQy+5yeOgC+Zx8edsFe3DUVwlEmJQm6sdrUM97CePgLKfRQZLYc8Jh H7A4umXQ6HuNJTRBleZw9uk7EkTkl1Xvuyt5/Dtj6yPPi1KEeHZ8+HfX9QS3M6fiWIDR OQyKJplyhInAqzHQom8MCImC4kVXcEqVCWehLgMcPYKBAUoRdXPjDZqAQq5XtJ6O+/Bp rtBg3g4W/lmi8d+OmO1CnZ5DvNQmtry4rIBaYwS6SUP9TxeF9S8L7FOvocAmGE+m+9LY IaUg8U4QKTJiZ/oSWUCV3dpk3aCjG7DeVBxYd6aHjlroXOGu9t9jkvFeO73SeKtjXMnb TVQw== X-Gm-Message-State: AA+aEWYYu/O+vUGf9laFTSfcjiJyRKSFvB/vzW3ZSx46pd9V04SHuTFJ ZBsTDX+CeCpFgOS409sUzNA= X-Received: by 2002:a62:442:: with SMTP id 63mr29667407pfe.156.1546047190014; Fri, 28 Dec 2018 17:33:10 -0800 (PST) Received: from [192.168.1.101] (122-58-176-92-adsl.sparkbb.co.nz. [122.58.176.92]) by smtp.gmail.com with ESMTPSA id i62sm48795899pge.44.2018.12.28.17.33.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Dec 2018 17:33:09 -0800 (PST) Subject: Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM To: Finn Thain , LEROY Christophe References: <20181228173846.Horde.z_zDEJN0rVd8tkt3HjYzmg2@messagerie.si.c-s.fr> Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-m68k@lists.linux-m68k.org, "Martin K. Petersen" , "James E.J. Bottomley" , Greg Kroah-Hartman , Arnd Bergmann From: Michael Schmitz Message-ID: Date: Sat, 29 Dec 2018 14:33:00 +1300 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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