Message ID | 20230313182918.1312597-29-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 v21csp1357727wrd; Mon, 13 Mar 2023 12:11:07 -0700 (PDT) X-Google-Smtp-Source: AK7set+M1kNIFXexr0Ye9nEELnWKfO7xfEytbNT/jjePpxf6V92MIuQA6BP1FPseIvpT0SyraUxZ X-Received: by 2002:a17:90a:af8a:b0:23d:1f5d:7181 with SMTP id w10-20020a17090aaf8a00b0023d1f5d7181mr2151120pjq.7.1678734667058; Mon, 13 Mar 2023 12:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678734667; cv=none; d=google.com; s=arc-20160816; b=POYzrdTspfVa9nTkvQmPvbU4lnxIkaQC70yo2QOE3aALyNfeuhiI8n1SOtXxqI/y3f x0JlgI/5wOAl4EjgGy6hldv+G1gNQbdWYFr4e3vUOnjldtqV2dSX5XXzuosHfFvjiw4R 2jGOMzf68dorXM3sWYhwnjUohPHTe4Qm+LK1Fm87ULWQZWcapDrC0WDrVxYRmnpup37m mFJlmx6b1pKRDTxUwizPFLsGdc64JuJ23lXT9lzWNo+8R3Ez+j/3DO2bPSMGCbpsojwc 8u1bB1+ScXhegE0wRqsnyPB3k1d+wifpkVHt2ZWh8+B0kE3YRDjq6mNALAYUZRgBuslS YFdA== 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=kbUFaHpIM9F0miqwKycD2m2tCW1g0TECf9f9DSp/btE=; b=1EWQFKe7yugSPsq8XPX3w3DW9VQDMhwnzkUMGKmeuOjIOqjhDmT4B6/EReNVvyvKN4 qDUzjZqDEUp3OR/ELlVxp9Jc4PYaDTldJfZuyj5wEFbQ1PNtfdQr3N3c1gbc3RDKuLPu E0gSkSlraDzK3V/VaMgu/f2K42Y8+1Dz+UELd2fkGFCK88g0evUrltayJaYnN6DU9pQo lOnwXdlDtiDhpjft3z8y1YRAYZqFMrx6Y62Bii+zYlljN7BGTLlsT9qvzawamHKW5PcC rHDb6Nq58/G4WbI2IhNUYTlahYpGzidk69hkDhBqGgMilopmgi8vU9SUhHP/wAHn5aoX TLfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2SJ8103H; 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 o3-20020a17090a0a0300b00233cf305f6bsi398141pjo.111.2023.03.13.12.10.54; Mon, 13 Mar 2023 12:11:07 -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=2SJ8103H; 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 S231441AbjCMScm (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Mon, 13 Mar 2023 14:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbjCMScD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 13 Mar 2023 14:32:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF97280E2C; Mon, 13 Mar 2023 11:31:11 -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 28AB661365; Mon, 13 Mar 2023 18:30:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38018C433D2; Mon, 13 Mar 2023 18:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678732251; bh=akchBNDul5kGQ4bbsIzqd3Wkn40724BLCL8j8t0kerc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2SJ8103HKr4PjUlRjoNwdWxY4QSChA0Dk/7hva88/LA8GHYXMB8IgF/YEsYBqr+vs gCkkVmofymj5bAKAEru2Vmoo+ZVILdNd8f3XVaOVgXwXnz+xAa9cj9TGJ1FMgAsRq8 fwX+Gz8OgKIeU7d53oSMYt7MCRVpkyQGNP0GlA7Q= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: rafael@kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Weili Qian <qianweili@huawei.com>, Zhou Wang <wangzhou1@hisilicon.com>, Herbert Xu <herbert@gondor.apana.org.au>, "David S. Miller" <davem@davemloft.net>, linux-crypto@vger.kernel.org Subject: [PATCH 29/36] crypto: hisilicon/qm - make struct bus_type * const Date: Mon, 13 Mar 2023 19:29:11 +0100 Message-Id: <20230313182918.1312597-29-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=1534; i=gregkh@linuxfoundation.org; h=from:subject; bh=akchBNDul5kGQ4bbsIzqd3Wkn40724BLCL8j8t0kerc=; b=owGbwMvMwCRo6H6F97bub03G02pJDCn82dXSruqi1/y0HkotvSXhxmX3ft6cbz25eoLbzpoxH 69heZrYEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNR280wz/zjnVbzmU4HznI9 bXQ9/edf9BXehwwL1gstPiSTGlNWepzxOtuTnxffXLDbDAA= 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?1760280882242760400?= X-GMAIL-MSGID: =?utf-8?q?1760280882242760400?= |
Series |
[01/36] EDAC/sysfs: move to use bus_get_dev_root()
|
|
Commit Message
Greg KH
March 13, 2023, 6:29 p.m. UTC
In the function, qm_get_qos_value(), a struct bus_type * is used, but it
really should be a const pointer as it is not modified anywhere in the
function, and the driver core function it is used in expects a constant
pointer.
Cc: Weili Qian <qianweili@huawei.com>
Cc: Zhou Wang <wangzhou1@hisilicon.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.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/crypto/hisilicon/qm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, Mar 13, 2023 at 07:29:11PM +0100, Greg Kroah-Hartman wrote: > In the function, qm_get_qos_value(), a struct bus_type * is used, but it > really should be a const pointer as it is not modified anywhere in the > function, and the driver core function it is used in expects a constant > pointer. > > Cc: Weili Qian <qianweili@huawei.com> > Cc: Zhou Wang <wangzhou1@hisilicon.com> > Cc: Herbert Xu <herbert@gondor.apana.org.au> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: linux-crypto@vger.kernel.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/crypto/hisilicon/qm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index e4c84433a88a..fd1a38ee55f8 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -3691,7 +3691,7 @@ static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf, unsigned long *val, unsigned int *fun_index) { - struct bus_type *bus_type = qm->pdev->dev.bus; + const struct bus_type *bus_type = qm->pdev->dev.bus; char tbuf_bdf[QM_DBG_READ_LEN] = {0}; char val_buf[QM_DBG_READ_LEN] = {0}; struct pci_dev *pdev;