Message ID | 20221021072310.3931690-1-gregkh@linuxfoundation.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp541484wrr; Fri, 21 Oct 2022 00:26:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4tEkWAzGxkV32D1FVMq7YXwWEdQ9NVfM2WJVbXvRI8AXgboaz3TepJukESK3R2J1mlZuZP X-Received: by 2002:a17:903:24f:b0:178:bf4f:fc7c with SMTP id j15-20020a170903024f00b00178bf4ffc7cmr18332177plh.124.1666337166781; Fri, 21 Oct 2022 00:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666337166; cv=none; d=google.com; s=arc-20160816; b=U5K1o2w/vs+8FrLn5sEC1Qvtnm1WVAsO0ZmqamyfneGjXa/jkesyLwiEiNvcjKreNl hv/vebikRheeTYGWqWv3X8E5FNJqF3iU69YTj2LAW9Y3oGTTE7RnT8LKWGB86TTZbaL+ cyeoISZ2RvDviCNdCMyXxwzHx5CVbxq1ec2CLUn4yLr3NUtomt+IirkcJEbKYEBYZ1lA mmjCdS+JDyinHzigFLuMxZMQENhLLQXCPEqLwgnqhjBHi6VPDCzpjkn1GbIkKac+Q1fV NSRs8AeXK59fx7stXlt274UrhTrG1C7pimWoYsM2ktZgwtW/tGRqh91N/ch+rqhUWBeY XoyA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=xBh6S5cZTl18/3cwIPcLL8s2f1qJJvrsVen3YKhXIA8=; b=vNtNB2uItleFx40LO31+Sy2tiF75dsamQ1msUCkswjh3P8qAO8bZtagLzPCYSvwQdO m3eNO3tr6mAEsX/LbHGjS8fsCk3+wxRDDVgGpIZGIkkedCneiVmiNUgoxGYhJ2e+iqCt inQV/cYcynwb2/M6o91S6eAKRWr3AOkW4ODVZYlv/uplfyrIWgLqr+dFKgdOUeJNowv+ YDTkAxBlwHMZxeHnU8xdvdVocwDyet5IGpEPLBR8Qh0h2YB95rmKQOBNCX/bVv6GCy1n f5sHoo6G34hHvVWH7TGP7XJKidO4nAIJps/NPu6k0luD54ikyZJmZj9XSOlJVbZTCuN5 QqsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uc29ucxt; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a056a00234400b005436ab3283csi21000979pfj.43.2022.10.21.00.25.54; Fri, 21 Oct 2022 00:26:06 -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=@linuxfoundation.org header.s=korg header.b=uc29ucxt; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbiJUHX0 (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Fri, 21 Oct 2022 03:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbiJUHXV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 03:23:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111602465F5 for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 00:23:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B79061DC5 for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 07:23:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 282C8C433D7; Fri, 21 Oct 2022 07:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666336994; bh=bcoMgCk0yZGwHr1Q/MWzklE8eNnrm1HaRDamF/Uhm+Q=; h=From:To:Cc:Subject:Date:From; b=uc29ucxtd8oIh6NZDZu0CjYH/bqr6SrS2tAIoV0jlVkj7TDV6ct+0aaMIiK1ImVeB uxe3PrSkWmi5fAOR1qpeRW1jG650EVgdJvIfEiFySUN2z9IKZL2DozqaHA+bUC134v meu2ECVG7Hc6y2JWQlyh+9rjyBLY/b9a7zWs/jBY= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org> Subject: [PATCH] kobject: make get_ktype() take a const pointer Date: Fri, 21 Oct 2022 09:23:10 +0200 Message-Id: <20221021072310.3931690-1-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=820; i=gregkh@linuxfoundation.org; h=from:subject; bh=bcoMgCk0yZGwHr1Q/MWzklE8eNnrm1HaRDamF/Uhm+Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDMlBHnddNeK7Mr6veKv40ufXT/4jfA9jpCPkQ5YrhTouvnrt 4K4bHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR58kMCy4a7HOTVpbLOyrUcUpy6p JDk/QkxBjmu/mGcdqkmy682eHHXhldzqUaJigMAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747281160748611752?= X-GMAIL-MSGID: =?utf-8?q?1747281160748611752?= |
Series |
kobject: make get_ktype() take a const pointer
|
|
Commit Message
Greg KH
Oct. 21, 2022, 7:23 a.m. UTC
get_ktype() does not modify the structure passed to it, so mark the
parameter as being const to allow other const structures to be passed to
it in the future.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/kobject.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 57fb972fea05..fc00cee1359c 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -198,7 +198,7 @@ static inline void kset_put(struct kset *k) kobject_put(&k->kobj); } -static inline const struct kobj_type *get_ktype(struct kobject *kobj) +static inline const struct kobj_type *get_ktype(const struct kobject *kobj) { return kobj->ktype; }