Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2040566rdb; Mon, 9 Oct 2023 10:28:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMZ3I5ot2gDZpyVPeubGyewCP215/gU3cV9+R+6Mi3oW07a2EOW+VMB39ND5f8MCg9uIab X-Received: by 2002:a05:6a20:5485:b0:136:e26b:6401 with SMTP id i5-20020a056a20548500b00136e26b6401mr21294505pzk.16.1696872518249; Mon, 09 Oct 2023 10:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696872518; cv=none; d=google.com; s=arc-20160816; b=fsCl62kAMIAE6VBNxhgJctUCaB9Dz/uzzEist+wishn6B2aXndOQg79PcJ3ku1XCro p4VeJKe2+0wHqhKYA7c7WEG5PiZrfkyLqXBbkBhTvbPUt1HojZjK4LORqebc/GFjr9ko DYUSFwDYry+slhNpiMVaFnwlh9cedO53rEa5NdbmlBlNGTRyrJ6jC9GCNPRo7cBdx6b1 RhbdtGwQXzSmNMOV7kQuIBbKYPauLMWSWpTNdN2gsCVPgmnxGYn1SFji4mCrNxINYSJe W2LyPPhJDGT+jayr+R/5HE6nq7UWu4FiU0VSJuShoEQEk7SL80rqIZ+tJSjQG7s8Mmgr ifNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0y/IaJ8Wt/BoETbVcw3q6QBPp8dcU4xvdRHj9nAw1wc=; fh=FaZVX6S28u03nEQfeGqMKyhQSNnNMDV5BqkcyFgynCQ=; b=1GWVlyf51JdUdEdyx1zfGddJqzGMPobyTIuhNuJiFIXSU9IutdyuMX56RruxVBxm5G zJzaRhD98g/R5GIgjky/np7fZZzTL7CVpTnLvOUQI3NPdjoFAT/FyVaCLf7J1/lXQITx /d0h0GUFBBAF05kM/SNjRjQfbMKF5ZbHyGP2Dv7WeVw6e1LndlZSknRcNmjrr5wxalkx ZGhsRgrHVgA4s6TzKgBPuQWIh0AJPVJqJ7VVWxW5CK8YNO2cSFLZzE0keSwwWu5hoVEq THlBKOhc5QDuojFd2QzmR6EZdbKtALJn3i0o3+SgldB+SdbuZRgNqGVSVlNSjROtU/oQ 4Ltw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=JVRxkyor; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id z10-20020a056a00240a00b0068a6f6d9f7dsi8113165pfh.57.2023.10.09.10.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:28:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=JVRxkyor; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2C87C804434A; Mon, 9 Oct 2023 10:28:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377908AbjJIR2X (ORCPT + 99 others); Mon, 9 Oct 2023 13:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377524AbjJIR2V (ORCPT ); Mon, 9 Oct 2023 13:28:21 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA23EB0 for ; Mon, 9 Oct 2023 10:28:16 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c27d653856so70041931fa.0 for ; Mon, 09 Oct 2023 10:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1696872495; x=1697477295; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0y/IaJ8Wt/BoETbVcw3q6QBPp8dcU4xvdRHj9nAw1wc=; b=JVRxkyor86+pRUcKAPC22lAcDzcg3Hu2/A2psvixq8NgWnygjCalTlXMyIyYKr3ty0 bd0qR1gpD8jLYU8Vkwiprn5/8qptvkLO2nEn780tLqQec4jk04gflPcJhQtdCZ5chVOb FwbIAz/7ehr2YkgnMWGd47FtRatlKchtQIDMZvZ51AIW/+zsd7JJ0ez6jogOk7H7J3jO xm1d1v/GFBRESBpwGZZ/LzMXOhGvsz1Ezbw1tLrtWsDE9gD2IosY1cnf/dKJqZQy2pnA bAem4JekfuRt+cgerfB0LMLcp4Oe5k7HvTcr+m2+yN04lGh1LwviuF6wXdzKWLoQCT/K LnDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696872495; x=1697477295; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0y/IaJ8Wt/BoETbVcw3q6QBPp8dcU4xvdRHj9nAw1wc=; b=O9dm5+qhLQi9zrHJ1nBHjL13lCcyU+qJ9dGC1NhHS/HrZrbbZbnH0WazsH+fZmZkc3 /hdZmN9WE8kmeCJqQaIZ0wfN/nd8ixhvLMPw0NAFtLKCvEtCux/NlILh2lg4LiPkBNoU K0ZprmsVbbvxUQ2p/KVlInmOFGqHiD4cehE4WLwMjgJS2oEErQLl5+Ii+JqNbVDZ6nzM QhmEZOu7gV53QUqx28RfAO7I+d2ZdpVIgFhre4QB2gdQ2RwgUZRfi6cGErM5IomuNjWO U3Mt5EbkMfM2aJH0ZBW5GUZFzmQybFGtwKXoxYPNOlvuaL22pl1pFhW1+FeLzD4g7Vbl Va2g== X-Gm-Message-State: AOJu0YxZUHTSEbIodArfxw4ulFlIafSS9uMd6EYe3926mThvNm9sfo+J UdXpIKcTfKOtq6AQzkXPXKkbWgy0z6k0QCZjf8RhQA== X-Received: by 2002:a2e:9b88:0:b0:2bc:bc6f:e296 with SMTP id z8-20020a2e9b88000000b002bcbc6fe296mr11161379lji.13.1696872494865; Mon, 09 Oct 2023 10:28:14 -0700 (PDT) MIME-Version: 1.0 References: <20231009165741.746184-1-max.kellermann@ionos.com> <20231009165741.746184-2-max.kellermann@ionos.com> In-Reply-To: From: Max Kellermann Date: Mon, 9 Oct 2023 19:28:03 +0200 Message-ID: Subject: Re: [PATCH 2/7] drivers/hwmon: add local variable for newly allocated attribute_group** To: Guenter Roeck Cc: Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 09 Oct 2023 10:28:35 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 9, 2023 at 7:19=E2=80=AFPM Guenter Roeck w= rote: > I have no idea what this is about, and I don't see how that would > improve anything, but ... Later, we can make lots of global variables "const", which puts them in ".rodata" (write-protected at runtime). This is some micro-hardening. > CHECK: multiple assignments should be avoided > #101: FILE: drivers/hwmon/hwmon.c:794: > + hwdev->groups =3D new_groups =3D kcalloc(ngroups, sizeof(= *new_groups), GFP_KERNEL); What program emitted this warning? checkpatch.pl had no error. I'll change it in all patches. > either case, this change is not acceptable. Because of the multi-assignment, or is there something else?