Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp127754imm; Fri, 5 Oct 2018 00:43:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV63AEHpMpPOerGp44RIovJduOP2uTivlPcALPSaZ33/JrSvPo9oE5xagGmwFfdMx9NAhJwmm X-Received: by 2002:a63:9752:: with SMTP id d18-v6mr9160004pgo.405.1538725424869; Fri, 05 Oct 2018 00:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538725424; cv=none; d=google.com; s=arc-20160816; b=zIKJnZYp4O055Nyaw6BaWkijNuqrPmv+svk/4Rb1E8u63Q/OZajCWA8u6R3yEmaD44 +9wHp3Lm4W2xSehnMYGtnahbup72kpivhmQkc5Cub7TI/9cYVwtyfqNgoNGgVjkS3974 WleKxjdlYdhj4CJoJ4vwfiCbXOtD/3q4BRo2xu600udBYAoBjeXzKubJ3ZlLMLbAMVfJ 5Kzx5UcJ633qQefzPiZwG0LI34WEmN7+WfFsTfs5osTOI3ME6nz8NLk4AFufVihWGrpq FOTMKEmoeRK47Z7/2423GG5Qssp323gWlxo2rNpnxe50eXWprCIWUESXaKaINHcXOCAq zlxQ== 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=97/kGLrdnBlyFhgI04CyxK7uBCCHJshpKqXLUVCfu1w=; b=vsjgCSCrTnaAolcSVlHP63EQLSXj1EvHcKnleR9/3jWxRRy2bU8UeX0aNkMwVEXo63 8UAcfbzQ71ITpaJU+EeUwY3L5C6Qx2fArm3ADSqMMV23lGf1NbhurWY4i33Ja3MJoPYt n/md60PJR6whydiEiNKkbshBy5w263MIIRbBaXzZnlPz2qLBbvTeJfAlD25xS/LnVnNr 1e5Ibs0DsMrvM/2PcNt0iAoeoLKY//ZLRifYKepmPw+jYNbSrXfZiKYrFRFb8SIQfvPe 3+nMow0thEu3fqPUwQMWWi6W8rrjg96P+WxBMN8dktLjfuG91UC5/rsI6L+jb4FQosyj csLA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p126-v6si8164922pfb.77.2018.10.05.00.43.28; Fri, 05 Oct 2018 00:43:44 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728461AbeJEOj1 (ORCPT + 99 others); Fri, 5 Oct 2018 10:39:27 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:47020 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727830AbeJEOj1 (ORCPT ); Fri, 5 Oct 2018 10:39:27 -0400 Received: by mail-ot1-f68.google.com with SMTP id o21so11523580otb.13 for ; Fri, 05 Oct 2018 00:41:58 -0700 (PDT) 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=97/kGLrdnBlyFhgI04CyxK7uBCCHJshpKqXLUVCfu1w=; b=Tkzm6+kIO1uAFSClqsGPhn26aG76PvHT/vCl/6bB7N2AI+cmyyg4Cv9pG0n+EbOuvq mVSmyehQlPrHXYIcOvFtOe9TauvnYoXpLaWtPL87M3goWmV3GJDomVJkN/F8RstcHTOy R8z3GZM7LrOfiFjr5JgmCZaOvInZEbqDaJR+kzEhBt4+zI0L2Fjq7GbWGOtI1klm3dsP OoRW2t8mq/PWomRIOvh8nmChX0TC3vQzsOpYwOQuvFAHgUB0bXLSPa8lOdGNitgCG7z0 D0Op2wVFoMpMfTYseReg9Exz3zvZZZHOwcilVdOIRyh2V9DBzYxUdyAycamvAZklk9Py U8Lg== X-Gm-Message-State: ABuFfoicgxPsm/CUaKZpK0Y8M0X2OPCaSvSyJo9fISeDpL+Qa2Hi6FuG UcZYd8evaIbbNmb0xPqMJkf2SnWEIVSeremeQHAu1A== X-Received: by 2002:a9d:2af:: with SMTP id 44-v6mr5459517otl.244.1538725317664; Fri, 05 Oct 2018 00:41:57 -0700 (PDT) MIME-Version: 1.0 References: <20181004143750.30880-1-jani.nikula@intel.com> <87lg7cq1z6.fsf@intel.com> In-Reply-To: <87lg7cq1z6.fsf@intel.com> From: "Rafael J. Wysocki" Date: Fri, 5 Oct 2018 09:41:46 +0200 Message-ID: Subject: Re: [PATCH 1/2] sysfs: constify sysfs create/remove files harder To: Jani Nikula Cc: "Rafael J. Wysocki" , Linux Kernel Mailing List , intel-gfx , Greg Kroah-Hartman 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 Fri, Oct 5, 2018 at 9:36 AM Jani Nikula wrote: > > On Fri, 05 Oct 2018, "Rafael J. Wysocki" wrote: > > On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula wrote: > >> > >> Let the passed in array be const (and thus placed in rodata) instead of > >> a mutable array of const pointers. > > > > I'm not sure if the changes guarantee what you want. If I'm not > > mistaken, they just mean that the function itself cannot modify either > > the pointer passed to it, or the contents of the array pointed to by > > that pointer. They don't imply the location of the array itself, > > though. > > I mean, this change allows the caller to add the appropriate const > qualifiers to the array definition, allowing the placement in > rodata. Can't do that withouth the extra const in the function. I figured that out, but the changelog is a bit unclear. If you said "Allow ..." instead of "Let ...", it would be somewhat clearer IMO. :-)