Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2752629iog; Mon, 20 Jun 2022 04:08:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tR+hE3yB9bVoAyWKuPv5NplS8oBp+jxFXCAw59CqrzlXk0YBH2zsgAxxiBOId+AcI7Qw5L X-Received: by 2002:a17:906:2885:b0:711:4611:95cc with SMTP id o5-20020a170906288500b00711461195ccmr20820188ejd.38.1655723314461; Mon, 20 Jun 2022 04:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655723314; cv=none; d=google.com; s=arc-20160816; b=oc+eAT6Q6RnC1/8O9vjtty/VXLtWsmwEjZVSNwSjHP5v+NKJPO4ueMzqjVes/WJQE8 +JsU96zZfBN/SfrAyjyp64oX+kSXd35HRLB9ZA2/WhRWkUVeF7D8c7gZP92fxk4A8r/h CCq2krSwCLRN7TTdq/qxkAGGtkqTtwwrhVs9LblXKuygAuFSj3+KJj/d06j7Y/rCBBt1 QrcXh9kks8Jxa5QeRZO2pur9jGS1JjDXeNa2HMq9uNsisvxvgOohSzuAgd2Mwe6Di1dW kvEZv3tGI5ldgH/13JhIGEV6+/2/S++kjAOL1ky0pQYujiHX65qfzyTP8IQMPDmsUXWb ky7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IXHVUeNmneDajw+ibD51KpGlnvzBH9kCBPP2HDS3q8I=; b=ScAqaBiPmEKPcPIY9brQtnQNzHfktr9fT6cvisp8Pc8Xw7qGR0zdzunJRZWJbwsSnw igTNyPNogNzmxmAWkUnSdwZpjfy6+Lh4YnLuatlTFwep6joMDEIYM1UfdNB/g6uNS6e8 VPJhkxB55CUacBuW9wPtTw2X/3DtNmDYzssJoC5Mc0WWFa73kxoBlSSC1EfOpRi63i8e aC0h4v+nOfrEuUCAChvAmHdRTgQxiEBV1bK7MvfE1sxFG7k+nWrd0rIfwd8HITJh/1BI SO7fpauJvP1RfhUagT47WgtGwi0X+RCkLqoIOAHPAgFFss2q+c20sHovXGLyc/hqOvSj 5JvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kypU7yXQ; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr20-20020a170906d55400b006f3a3c6b04asi10090091ejc.295.2022.06.20.04.08.09; Mon, 20 Jun 2022 04:08:34 -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=@bootlin.com header.s=gm1 header.b=kypU7yXQ; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240183AbiFTKnM (ORCPT + 99 others); Mon, 20 Jun 2022 06:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232170AbiFTKnK (ORCPT ); Mon, 20 Jun 2022 06:43:10 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0232411479; Mon, 20 Jun 2022 03:43:08 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DE50D1C000B; Mon, 20 Jun 2022 10:43:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1655721787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IXHVUeNmneDajw+ibD51KpGlnvzBH9kCBPP2HDS3q8I=; b=kypU7yXQ/FHnAbnNy+uO0irNGl56e/VaBhr5vCfPYqeQgWB87sR9f4AzcGFNYJzwdeqKDj ni1+AxV6u6bhZpMqIvrlCITEXOircgyRFMQfEH/n8z5batTGeXPKfctmkyTSuxVd8JdOUU XvgF3MCbeEmvfcKO8vlUiEipFZxN6NOIX70T6w2Jh+nTE5FGLdMs/BqmtvAC9Pt5RAH871 /IDH2CJbe65iniX9xUscqS5fSk8ZGxhpEWflf0hKierDj5fUYL2aMdyY4SvEg+yzrstnA9 hxglqyxDbLdn9xgbGks+B629Z9y05eQEujsByK6V89/b3fjYcpOE5lsXaCu+8Q== From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Rob Herring , Frank Rowand , Nathan Lynch , Laurent Dufour , Daniel Henrique Barboza , David Gibson , Andrew Morton , David Hildenbrand , Ohhoon Kwon , "Aneesh Kumar K.V" , YueHaibing Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni , Bjorn Helgaas , Lizhi Hou Subject: [PATCH v3 1/5] of: constify of_property_check_flags() prop argument Date: Mon, 20 Jun 2022 12:41:19 +0200 Message-Id: <20220620104123.341054-2-clement.leger@bootlin.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620104123.341054-1-clement.leger@bootlin.com> References: <20220620104123.341054-1-clement.leger@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 This argument is not modified and thus can be set as const. Signed-off-by: Clément Léger --- include/linux/of.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index f0a5d6b10c5a..d74fd82a6963 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -207,7 +207,7 @@ static inline void of_node_clear_flag(struct device_node *n, unsigned long flag) } #if defined(CONFIG_OF_DYNAMIC) || defined(CONFIG_SPARC) -static inline int of_property_check_flag(struct property *p, unsigned long flag) +static inline int of_property_check_flag(const struct property *p, unsigned long flag) { return test_bit(flag, &p->_flags); } @@ -814,7 +814,8 @@ static inline void of_node_clear_flag(struct device_node *n, unsigned long flag) { } -static inline int of_property_check_flag(struct property *p, unsigned long flag) +static inline int of_property_check_flag(const struct property *p, + unsigned long flag) { return 0; } -- 2.36.1