Message ID | 20230313182918.1312597-30-gregkh@linuxfoundation.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1346467wrd; Mon, 13 Mar 2023 11:45:22 -0700 (PDT) X-Google-Smtp-Source: AK7set8zmzzw+iYerO6evyCVWLJZh19rcV0nQrT25n+Aua0FM4FNzwAB0ESqtjVbvOqWMYKS2Pvl X-Received: by 2002:a17:903:187:b0:19c:be57:9c82 with SMTP id z7-20020a170903018700b0019cbe579c82mr44115816plg.65.1678733122019; Mon, 13 Mar 2023 11:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678733122; cv=none; d=google.com; s=arc-20160816; b=SDLzxgK/bAZOHM3JMyqrHQ5UUD+iBrV2qXl8nj0fxjnveQdINXA+t3ELP26/2FX1ux wKs3zaHrx83YdWVkfP+mhYhWFTdlyEtRTSbFG4AOapg+fWH7Q1ODvnAX8XnwJwrKmUc4 AllI8F0pPhFyAHJts+rOlp+BI3tJLT+53M79vF+wQrERo5wkeifjCuTXEHEgB7MaopKy MSiV2PORR397TMJ5VdUqPbWFXS908NAa7NRIDCjnylPeQpty/dxbcMx88MWr9HQ6lS+v jgSJJGqdg4/m13eoJHi03NuGcd4C6rAoMU/UcMJWU7Jx2DWcb+ws8uKjoZQ8ieFKfRT7 9wSw== 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=kEuVJUxLPOYo07D49rvUsSVXzQyu6pEDO+uVoOTyksA=; b=QlUpCEV7HnVKnnBUoqws0IyDyKYEVVV8ThTJD1YS8wuqFIpfjiDiqQbu6xz7T/ahP1 PWD8e24YaaZcP8GFv2TI4SvljQUoPx9uv8r7Dmfx9CXmRauf34jCXrwxm2cNlNvc32Fs 3C8W2Vo31pmlJg+iQ/ERd2/AOJB5E1VIeSPldxs0W1FwkgErRWMgr+wl03GNsgQnKu7k u81b6mdoSHhZoYUbz6K3BKSD45Vq+IbB3YkzceG0o/44GnTehyXEWf7Df7YW6RXWRwgb j2eAptKz0klpMuEoqxJyYpV5+LgDf4/T6PZzBlXBe0b6U4tG0zGKTeK7XNY4JGYzb69e VvJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0FMXy6Kn; 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 bj7-20020a170902850700b001a05d77ca66si364352plb.501.2023.03.13.11.45.09; Mon, 13 Mar 2023 11:45:21 -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=0FMXy6Kn; 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 S230265AbjCMScX (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Mon, 13 Mar 2023 14:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbjCMSbe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Mar 2023 14:31:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C643280932 for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 11:30:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 67CA9B811E0 for <linux-kernel@vger.kernel.org>; Mon, 13 Mar 2023 18:30:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1439C433D2; Mon, 13 Mar 2023 18:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678732254; bh=xXfHOtpB42Nc5WnZyQQpmBHFWLUExBdm6jawq0Jm084=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0FMXy6Knts0+zZgypoJ0GS2NVaLO5tLbDYgKvXx7LMo+bv1jhAWytcutb/BiI1vmD yBEXUeCTIezUvb7qFu7X1zL/BBLS5n8X+R2ydR39/TuRmUuIlR6blTMiIf1xBYy5xQ 19+sdyeK0HrYZKr/HzYzLfOdhn58D730PvNR5Cdo= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: rafael@kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jani Nikula <jani.nikula@linux.intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>, Alan Previn <alan.previn.teres.alexis@intel.com>, John Harrison <John.C.Harrison@Intel.com>, Tony Ye <tony.ye@intel.com>, Vitaly Lubart <vitaly.lubart@intel.com>, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 30/36] drm/i915/huc: use const struct bus_type pointers Date: Mon, 13 Mar 2023 19:29:12 +0100 Message-Id: <20230313182918.1312597-30-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313182918.1312597-1-gregkh@linuxfoundation.org> References: <20230313182918.1312597-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3256; i=gregkh@linuxfoundation.org; h=from:subject; bh=xXfHOtpB42Nc5WnZyQQpmBHFWLUExBdm6jawq0Jm084=; b=owGbwMvMwCRo6H6F97bub03G02pJDCn82dUOV8LkZs1rW1FbEZ2+du0D7wfbfUpebF2pHn7h+ 5lpjir1HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARsTcM82y+VjUWN7TzOscl xYtl2WzK7ZLcwbDg8GWOaEHppcYb97/63/6QcaXxlcd/AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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?1760279261982943417?= X-GMAIL-MSGID: =?utf-8?q?1760279261982943417?= |
Series |
[01/36] EDAC/sysfs: move to use bus_get_dev_root()
|
|
Commit Message
Greg KH
March 13, 2023, 6:29 p.m. UTC
The struct bus_type pointers in the functions
intel_huc_register_gsc_notifier() and
intel_huc_unregister_gsc_notifier() should be a const pointer, as the
structure is not modified anywhere in the functions, and the pointer
they are passed will be a const * in the near future.
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tony Ye <tony.ye@intel.com>
Cc: Vitaly Lubart <vitaly.lubart@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Note, this is a patch that is a prepatory cleanup as part of a larger
series of patches that is working on resolving some old driver core
design mistakes. It will build and apply cleanly on top of 6.3-rc2 on
its own, but I'd prefer if I could take it through my driver-core tree
so that the driver core changes can be taken through there for 6.4-rc1.
drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 ++--
drivers/gpu/drm/i915/gt/uc/intel_huc.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
Comments
On 13/03/2023 18:29, Greg Kroah-Hartman wrote: > The struct bus_type pointers in the functions > intel_huc_register_gsc_notifier() and > intel_huc_unregister_gsc_notifier() should be a const pointer, as the > structure is not modified anywhere in the functions, and the pointer > they are passed will be a const * in the near future. > > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > Cc: David Airlie <airlied@gmail.com> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> > Cc: Alan Previn <alan.previn.teres.alexis@intel.com> > Cc: John Harrison <John.C.Harrison@Intel.com> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: Tony Ye <tony.ye@intel.com> > Cc: Vitaly Lubart <vitaly.lubart@intel.com> > Cc: intel-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- > Note, this is a patch that is a prepatory cleanup as part of a larger > series of patches that is working on resolving some old driver core > design mistakes. It will build and apply cleanly on top of 6.3-rc2 on > its own, but I'd prefer if I could take it through my driver-core tree > so that the driver core changes can be taken through there for 6.4-rc1. Sounds fine to me. Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko > > drivers/gpu/drm/i915/gt/uc/intel_huc.c | 4 ++-- > drivers/gpu/drm/i915/gt/uc/intel_huc.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c > index 410905da8e97..8b453bd7c953 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c > +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c > @@ -183,7 +183,7 @@ static int gsc_notifier(struct notifier_block *nb, unsigned long action, void *d > return 0; > } > > -void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus) > +void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus) > { > int ret; > > @@ -200,7 +200,7 @@ void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus > } > } > > -void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus) > +void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus) > { > if (!huc->delayed_load.nb.notifier_call) > return; > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h > index 52db03620c60..05d4832f8461 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h > +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h > @@ -51,8 +51,8 @@ int intel_huc_check_status(struct intel_huc *huc); > void intel_huc_update_auth_status(struct intel_huc *huc); > bool intel_huc_is_authenticated(struct intel_huc *huc); > > -void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus); > -void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus); > +void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus); > +void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus); > > static inline int intel_huc_sanitize(struct intel_huc *huc) > {
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c index 410905da8e97..8b453bd7c953 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c @@ -183,7 +183,7 @@ static int gsc_notifier(struct notifier_block *nb, unsigned long action, void *d return 0; } -void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus) +void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus) { int ret; @@ -200,7 +200,7 @@ void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus } } -void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus) +void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus) { if (!huc->delayed_load.nb.notifier_call) return; diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.h b/drivers/gpu/drm/i915/gt/uc/intel_huc.h index 52db03620c60..05d4832f8461 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_huc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.h @@ -51,8 +51,8 @@ int intel_huc_check_status(struct intel_huc *huc); void intel_huc_update_auth_status(struct intel_huc *huc); bool intel_huc_is_authenticated(struct intel_huc *huc); -void intel_huc_register_gsc_notifier(struct intel_huc *huc, struct bus_type *bus); -void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, struct bus_type *bus); +void intel_huc_register_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus); +void intel_huc_unregister_gsc_notifier(struct intel_huc *huc, const struct bus_type *bus); static inline int intel_huc_sanitize(struct intel_huc *huc) {