Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1154238iol; Sun, 12 Jun 2022 07:37:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ0tcgqYvnXdNE+p5uslX42jWoy4zabZ0HWSDbSBSd7Jr1x4y/4ZF0VtBv8y8f1MvGB+HF X-Received: by 2002:a17:902:ce06:b0:15f:a51a:cdec with SMTP id k6-20020a170902ce0600b0015fa51acdecmr53623230plg.53.1655044620419; Sun, 12 Jun 2022 07:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655044620; cv=none; d=google.com; s=arc-20160816; b=hyJ+mqpkfbv6ohOSO9t/jPiGs9BEUbw04btD+6Fn/+nm0BHAweRsdCpIQTU/SRbMB6 pp9NyVnP8xxehEvCPUZwoKtLCl4gTrs1ny9JNVMf8vw8b8VXHRYrUEeP62yHEpfapJwG A2ukMWGkxRRsR8pVLRKVcnvcKuXehCo0Z4jL9NiLodShEOgHgOweDr/XeU1OV6KgrP6V eMAh2C6evYTbgMgavaM8I04myms27DTDYbjLYs0J0UOa6STtc0yvwHCINvqsKritwolw g0RoVfAa06JdbeJxSAPDSEriS1fgtMQ5336s2PlBJBbzfvQ8ZTyrbfXln+XW+JB0PDlq EEUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=L7wZV8OxqYvAB1GlMd0evBeabIpJY4/r3rWWpYVpI+k=; b=Pk60mzHTA9m4Cjk1QuWbI9duMH9RXeVof0f9yHPe6AWzG6lSczdwGwcMRTO1MPF0ct Nfn3+xHLeKUdPwqXYsYqzBhcbKOLaIezvBdutY4XWEKPHvnbRIFl4TX68QAswxAwWDMN 1Qb6e+DYjYnjtiFFNkKuoiSjOC8kWIJ/BBVdocDHLOiTzsirB7MRwiw7A0HdEO8JhUde In6UviqY291FCPEwgDzLGjbPBGRNDszRteCdCJt6KSID7h2CLao6kgXTsJO7VKy3y3Ci v3poYKSOIFZ9kR0cohAKZQaXs/uIxHv24xdoeH26RCY069XmKAuYOTU6TSzPdwiRq4Im OTqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j5d2ONoP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a170902a5c300b00161ae4734d6si6313828plq.57.2022.06.12.07.36.18; Sun, 12 Jun 2022 07:37:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j5d2ONoP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236184AbiFLKqm (ORCPT + 99 others); Sun, 12 Jun 2022 06:46:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231658AbiFLKql (ORCPT ); Sun, 12 Jun 2022 06:46:41 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A3E1929D; Sun, 12 Jun 2022 03:46:41 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id v14so3860873wra.5; Sun, 12 Jun 2022 03:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=L7wZV8OxqYvAB1GlMd0evBeabIpJY4/r3rWWpYVpI+k=; b=j5d2ONoPE99ch9Qamp9mZJ9tAlkbgXFGiyti1lJQ9Orcr5mO65tK0YNRGsJXmztmF6 FpAazgaTAhGgBs085+A+z1OCgdJ8Zm6mhuzCqGJGGo4BTFNZaBD9hZsM4PieOZ4Pe6Mj 5th68YqiO6JsSZJasJamO5Lu4dFGmOTOf/XJD26oSna4H7/u2xIQCTmoDBUf2P98Nk60 Ha1GqFVryGEDwBJUh0yzGsXPAo0wN3+ltg97fZX6j/54kAO7B/TxDaTeBhFqkDf32yRi DiQvrtyiURqZbchBOGTT56qatDs5FyHczH0t1FhtiMMNR2h9pFjkwZGOX2TeI/SxAxc6 70IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=L7wZV8OxqYvAB1GlMd0evBeabIpJY4/r3rWWpYVpI+k=; b=H79z13AA8oNyhehPBCRRUfJxfGstMwxnLVNsQUViUcJBsaNckaGT4miqPict61Ea50 fv8H1afS2/T1TnjHaGbYWQSijlqfVUeprNHri4PJhywV0dwOHb8uNuRZfVFNs0BPLeks LPATCcyIy5wNsQWWnb0kKw57lE9V8Wi9/DaSthOXgyBhwA+pJK/p8T9m2Dmd8Aduwwyt QWYq3VOcLD2qym+uf+0uD0nINJZd8rsJGgIS7WZEfg9r3wx/jKUaiDGXELG3Rb+NbkW+ 4F1TqGP+WVT+J8Gk9BRJ8uQU2zb3JPjEpA/jOjxh8lsFtyncbFFTc/n+ip6lHO/lIrRq EwQA== X-Gm-Message-State: AOAM532Issi4eokCI009iuhGsVD0Ps3X2XRowZjLIYByntMXZ72+Z5T2 iDR7l4ouR0u2dTMEUpOVhofcHcV7TA== X-Received: by 2002:a05:6000:1f09:b0:21a:5f3:316a with SMTP id bv9-20020a0560001f0900b0021a05f3316amr805820wrb.682.1655030799648; Sun, 12 Jun 2022 03:46:39 -0700 (PDT) Received: from localhost.localdomain ([46.53.248.224]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0039c4ba160absm20880712wmq.2.2022.06.12.03.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 03:46:38 -0700 (PDT) Date: Sun, 12 Jun 2022 13:46:36 +0300 From: Alexey Dobriyan To: christophe.leroy@csgroup.eu Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org Subject: Re: [PATCH] module: Fix selfAssignment cppcheck warning Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -33,7 +33,8 @@ > #ifdef CONFIG_STRICT_MODULE_RWX > # define strict_align(X) PAGE_ALIGN(X) > #else > -# define strict_align(X) (X) > +/* OR with zero to avoid cppcheck selfAssignment warning */ > +# define strict_align(X) ((X) | 0) > #endif Can these myopic tools be taught to see around and notice second definition which does mutate variable so there is no self-assignment?