Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9327047imu; Sat, 29 Dec 2018 16:35:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN7O0FBUcTG9anvSQIeVozlsDIaslw/wL7EEPhHO90/y3Ud7fYLvDgYWQoLAaU/ehpNDuKKX X-Received: by 2002:a63:3204:: with SMTP id y4mr3097657pgy.41.1546130152547; Sat, 29 Dec 2018 16:35:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546130152; cv=none; d=google.com; s=arc-20160816; b=HnH1ftnIRr/W/8dzLe/XwOYMKDJrzLmHgkFFJkd8OYBuUF4uuGM5oMaQ/R+i3Fz/EI zCPulSYPM5LN50K0nqD0ptjw3dAtGaQsVxRHywHr4qgMbTRfW0svOxvBikhlrm2rA1sd Z3QEkozFhdtKrYkpLh3SZlrZPy1OYl8H0uoDl87yTKMrsFpZQD/laJ2fnix/aX9jgxMJ YDaa1d6BtvIi11PpLQZSCZUrxkguKo7e4KbZw3o81PtFWYeN5S1hsCAIO4qOps1vk1qp uPAJkBh48aCmwMmNKMHHR/qh/gSethoUGVUuhcaw0lNtv2TTd6jPUZd2jta9TEKqoxJp PU5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=WwVwB1S8LdUynVFe20mibVGVOLUyPee2SJD6q4AnfTg=; b=uO8fPcfU3n5AOpTpYl6p+dg1RpEdfDYRs6WGWq0M8Rq5rhyV/c4hHAWA9j+/V4+DEX MZGfBYd18KIielVkcAnSqm3EL5v93PpYQemvP4YSrSgGYEihCTWbjXlGRoJ8WUvORx0Z kiu0t9ozAkWc1eltcCt3yppPDReTp3MzR+j1lnn7jJJdMznHB9yCjvjipowvKZpp3ngu 51gvWpO3rBrWBC++imDiFep56Ez7OYqyVsBBHEBpcO5XMiPqDtCslyvY+cyVsCPmKq9J U2yWrHW/SYQ7YAz13sstRjw0iKoYzt4Vv7HWPOiHHDRw1mlOfy6iOTQIWL9A/BDMJXgi L7UA== 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 x10si21309637pgl.209.2018.12.29.16.35.37; Sat, 29 Dec 2018 16:35:52 -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 S1728506AbeL2Vhk (ORCPT + 99 others); Sat, 29 Dec 2018 16:37:40 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:36730 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727279AbeL2Vhj (ORCPT ); Sat, 29 Dec 2018 16:37:39 -0500 Received: by mail-qt1-f195.google.com with SMTP id t13so26505446qtn.3; Sat, 29 Dec 2018 13:37:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WwVwB1S8LdUynVFe20mibVGVOLUyPee2SJD6q4AnfTg=; b=H1GeJMCciFk9ozbZ0QeRWAm8NR1xSWI10A2Dq3O8EVGz08dVo2bwIcZ22Coxf4QZk/ LdCdf/tzl8S0a+QKI88UcBIFdVlAy7ktqIxJXwdVnSVm68UBUoH6TC4K0LkjfDwa0Js/ dP9Fp1IO+jrfwFZQmID8UnRi+zFsylH1E/7Iyk8xY3BZ0e/ZFUuzYk1XRre3mJo92UbX TN9N3EmiPGHH6dR2hgJnCS1BgRMVuAeeOpoAujxiFRNihml7GxxwTplyYUbXs1/YhEqS qPwS1HBBLdSv9bRciOzAyD/vs00I+S3MpgdhamSm9lOPzXY44gvnx3kwKp2AEWz7hOiK gt1g== X-Gm-Message-State: AJcUukekFp5EmYJWjWCW4xMligD4vtTuOnK6kCa+geSwb3RfL2HeoR5g 3/RTSGnSnPhBG/FHDHBcWg7EbeBvePopJu6YmR8ivmF4 X-Received: by 2002:a0c:f50c:: with SMTP id j12mr30406307qvm.149.1546119458090; Sat, 29 Dec 2018 13:37:38 -0800 (PST) MIME-Version: 1.0 References: <20181228173846.Horde.z_zDEJN0rVd8tkt3HjYzmg2@messagerie.si.c-s.fr> <5e901432-65e2-c87b-31e3-36a394687a9a@gmail.com> In-Reply-To: <5e901432-65e2-c87b-31e3-36a394687a9a@gmail.com> From: Arnd Bergmann Date: Sat, 29 Dec 2018 22:37:20 +0100 Message-ID: Subject: Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM To: Michael Schmitz Cc: Finn Thain , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi , Greg Kroah-Hartman , Linux Kernel Mailing List , linux-m68k , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 29, 2018 at 3:51 AM Michael Schmitz wrote: > > Hi Finn, > > Am 29.12.2018 um 15:34 schrieb Finn Thain: > > On Sat, 29 Dec 2018, Michael Schmitz wrote: > > > >> > >> 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. > >> > > > > Well, you are a maintainer for atari_scsi.c. > > > > Are you saying that you want IS_BUILTIN(CONFIG_NVRAM) used here instead of > > ifdef? > > No, just pointing out that there would be a way to avoid the ifdef > without messing up driver behaviour. I'm fine with the ifdef - not least > because it clearly eliminates code that would be unreachable. > > (On second thought - I don't want to speculate whether there's weird > compiler options that could result in the nvram_check_checksum and > nvram_read_bytes symbols to still be referenced in the final link, even > though IS_BUILTIN(CONFIG_NVRAM) always evaluates to false. Best leave > this as-is.) As far as I know, it's totally reliable with the supported compilers (gcc-4.6+). In the older compilers (e.g. 4.1), there was a corner case, where it could have failed to eliminate a function that was only referenced through a pointer from a discarded variable, but a plain IS_ENABLED() check like the one here was still ok, and lots of code relies on that. Other than that, I agree either way is totally fine here, so no objections to using the #ifdef. Arnd