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 AC966C74A5B for ; Mon, 13 Mar 2023 18:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbjCMScj (ORCPT ); Mon, 13 Mar 2023 14:32:39 -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 ); 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 To: linux-kernel@vger.kernel.org Cc: rafael@kernel.org, Greg Kroah-Hartman , Weili Qian , Zhou Wang , Herbert Xu , "David S. Miller" , 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 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 Cc: Zhou Wang Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.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. drivers/crypto/hisilicon/qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2