Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6532BC61DA4 for ; Wed, 15 Mar 2023 10:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232176AbjCOKQu (ORCPT ); Wed, 15 Mar 2023 06:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232288AbjCOKQq (ORCPT ); Wed, 15 Mar 2023 06:16:46 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276AF1ABE2 for ; Wed, 15 Mar 2023 03:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678875379; x=1710411379; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=rmJrMBCDLfJET/OCfZDk2lk9cUIq2z0NoHpCnWGNLN4=; b=Rs6zL2DVpRY5W8NYSddePoP1kUDtVqLssiUQMMT1JrACipPMpru/N6af 6CAVcuZ+GB1f1aRuYxviyKdILkUSnbSRwCsr9nctMRKV4w1eKz31QH6gP 6Ooh07qGYx5Nm6NjAzMBSa5F9LFfGzYA5cUsWEz2PyMH38IXxeGAkdHGg 4M0/M/1urSfoCwOZcmYfak08a5ddqDNIOI78Ug+gxvCLGSFw029VRgMDc 3+pg96eDovShwTYfzSuaoLFePXeiA5ys7/Fd3HvzraztsQBypJP7vNoez mhe/ILSOabgMI+t0ScQ7iSmQ4lzRhznboHDFHg4XbNeOBmr5dl3devVII w==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="337684895" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="337684895" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 03:15:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="709630303" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="709630303" Received: from mchanan-mobl.ger.corp.intel.com (HELO [10.213.222.39]) ([10.213.222.39]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 03:15:04 -0700 Message-ID: Date: Wed, 15 Mar 2023 10:15:01 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 30/36] drm/i915/huc: use const struct bus_type pointers Content-Language: en-US To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: rafael@kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Daniele Ceraolo Spurio , Alan Previn , John Harrison , Tony Ye , Vitaly Lubart , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org References: <20230313182918.1312597-1-gregkh@linuxfoundation.org> <20230313182918.1312597-30-gregkh@linuxfoundation.org> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: <20230313182918.1312597-30-gregkh@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: Tvrtko Ursulin > Cc: David Airlie > Cc: Daniel Vetter > Cc: Daniele Ceraolo Spurio > Cc: Alan Previn > Cc: John Harrison > Cc: Greg Kroah-Hartman > Cc: Tony Ye > Cc: Vitaly Lubart > Cc: intel-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Greg Kroah-Hartman > --- > 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 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) > {