From patchwork Wed Mar 8 14:55:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 66288 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp393476wrd; Wed, 8 Mar 2023 07:16:36 -0800 (PST) X-Google-Smtp-Source: AK7set99q+Xy3YWPtZm7P53EpZ9h6cttZ0t7e93WjPmbUaYNIc1pdBFcDPrvOLfat6Yzz+k7g1uq X-Received: by 2002:a17:903:2441:b0:196:5bac:e319 with SMTP id l1-20020a170903244100b001965bace319mr23490602pls.35.1678288595978; Wed, 08 Mar 2023 07:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678288595; cv=none; d=google.com; s=arc-20160816; b=JfbHumxmoPmDyX9i2QPCuvWnnG+wJCi10zeDtCp9KcWapsqrDr86VqWE/Ja5i9chQj 1PHWgyWq55DDg16qJSKI5KDUAF/Y4/6sCAVC78UGBUxCyUCihQTTCK7e+ltbc9Az+S50 xlA70UJtlP+I+BYZa7PNsUhaISInA+uMxRT/W3+STnxsc8ExKtVw+H9vnS95ngjy8Ae3 XyPw2iyXYGx0TzH05xZ7uNZoDwVxlYUjZTaQPH/jO7CHewIEYNhuSyf7VdihL4oeqK7d cYowu8k8OTthXYV8kTFHN//4SxzF9iLAv9T2gjiF9PvO9dupWAVKa2StjPENs8zYS3Pb omNw== 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=1/N3hjcEE32fI6fL0Z3K+IWx7N5W1QPfJk9RK/70oxw=; b=WceEIxC63q+0ExNrCPLivpKwWBs4Pqi+MLrTp5Xr6E79ycfWJjeCIwDRKm+r4OSN1y jdgVGxK9TroxXxx7k9Pe6k0RQMRELFymxn2sRK59jM5kBPtYekXzvDQDw/k6ppySXa/H 1Zppju5ZXjqBRhTt3JlEwt/O8oXONQeLxj+wl6jeuyomxjNTq43rFWPmE+8RG2CBg8K2 gQiEzyJ6pEu38mXgZWdrVIzmCSl6SScolT8VeMCBc0E9V9yQ8FMdfr32m0o3lGwtPGY6 3sB5D0llUQIcYc627LFybEutUTO4H4isIyeGp3VHlhYAEb4OvqIHqnacVFUeCOD3pqsT ymtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=fCEy6aRt; 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=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kf5-20020a17090305c500b0019ca645f1f7si14623574plb.325.2023.03.08.07.16.16; Wed, 08 Mar 2023 07:16:35 -0800 (PST) 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=@163.com header.s=s110527 header.b=fCEy6aRt; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbjCHO4x (ORCPT + 99 others); Wed, 8 Mar 2023 09:56:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjCHO4s (ORCPT ); Wed, 8 Mar 2023 09:56:48 -0500 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.216]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C1C8399250; Wed, 8 Mar 2023 06:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=1/N3h jcEE32fI6fL0Z3K+IWx7N5W1QPfJk9RK/70oxw=; b=fCEy6aRtuIDUpeHjL6IP/ 0EpnbGHbwt+uWbpS3ypliZ05qmljgdqt4FF74LgPT1htUBTIkFLrPC2oTzakqbIL VpFETSpv7CxfXdPNKuadtN3zxbhI4w6PfxskNgqioGEqP3iPBYkmG/v2t4CHZ1ZL Y0bHG9OB4zLxYchZIx5y10= Received: from lizhe.. (unknown [120.245.132.200]) by zwqz-smtp-mta-g2-2 (Coremail) with SMTP id _____wC3TkP7oQhkdGRNCg--.27004S4; Wed, 08 Mar 2023 22:56:27 +0800 (CST) From: Lizhe To: fancer.lancer@gmail.com, broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH v1] drivers/spi-dw-core.c : remove redundant function spi_controller_set_devdata Date: Wed, 8 Mar 2023 22:55:51 +0800 Message-Id: <20230308145551.3240-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wC3TkP7oQhkdGRNCg--.27004S4 X-Coremail-Antispam: 1Uf129KBjvdXoWrZrWrZr13GF4DJFyxWw4fuFg_yoWDWrbE9a 1UA34xWr47JFn7tFn7ur48Xr9IvFW5ur4vkF4ktFZ3WF98Ww4DC3srWr4Y9FyUAwsxArWk C3s0g3yS934rAjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRM5l8UUUUUU== X-Originating-IP: [120.245.132.200] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/1tbiKAIsq17WMQlXGwAAsR X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759813142790236049?= X-GMAIL-MSGID: =?utf-8?q?1759813142790236049?= in spi_alloc_master() already exists master_controller_set_devdata() called, add the struct dw_spi is passed to the spi_alloc_master() as the second parameter. Signed-off-by: Lizhe --- drivers/spi/spi-dw-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index c3bfb6c84cab..ad776c7eb66c 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -892,7 +892,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) if (!dws) return -EINVAL; - master = spi_alloc_master(dev, 0); + master = spi_alloc_master(dev, sizeof(*dws)); if (!master) return -ENOMEM; @@ -901,8 +901,6 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws) dws->master = master; dws->dma_addr = (dma_addr_t)(dws->paddr + DW_SPI_DR); - spi_controller_set_devdata(master, dws); - /* Basic HW init */ dw_spi_hw_init(dev, dws);