From patchwork Tue May 16 20:21:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 94928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp682591vqo; Tue, 16 May 2023 13:27:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43lH2ICw9Zactt6FQqRLgX8ZIGV8RL/aNXbcmMw7srF6T/R77PqBJtDdc4FILi8V3+CJBQ X-Received: by 2002:a17:902:dad2:b0:1ac:859a:5b5a with SMTP id q18-20020a170902dad200b001ac859a5b5amr40186110plx.0.1684268869809; Tue, 16 May 2023 13:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684268869; cv=none; d=google.com; s=arc-20160816; b=l9L1bJeFfKoGxseqSx3mTq1Py0e1N4WQhLxYyx+6EcfvGD6SOeuDUpvdPXCSC7w2tf sjhogOlEfmk0GY2ReaoNkKsi4GThHd2eGvW1rNXekLcLlJ3QXuJDHEMFqby1qNKcxGvu 0qPY75xUErzKHeLmXsXlvL0MKBBiD9vChmNbfwuDme/MJiCUvWYGGXtWsKVIj/3bUhdT svDIBFMalkL4sJaQ1qzSAf9cVeEGo4HScG2PYOXGvje90twvxKMPtG53QBwbO7TuRd4L BGrn8MX0nUg1TzeneQGkr6inSDMZRWrYMZsa8Ps4usLwkoAfxxy3N9zeSdHiTCW1LwlZ HoSg== 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=k78TuIwj9PIENZPEthDqoZXj+wHvcm/dHF3KBkr+8QM=; b=EicfxCwMx7tY7jGS87qQL84rQF/akhuRsYhqyKO6+nd2uHRdImAq7GKLMHXGYpLF4f ocrwhvRjB8KS13O+78S/hNVj4i58OcSocZ4sYBmYqO2rU0ewU5YPai2lfd9RgDPB/hGj IF4Z2V5y3WGcqGnomp6wPuN2X2X7A/S9BtQjxOXuOi5QbyYMy9ygW/UNxG1Bh34H7eG3 tzI8035zuMGzYctcfXI0A8bsl6zBPVifTYdsdCSrPY97E29vPdG5PuTkjm8GfuIlRdyO nqkmrulDx6QX6z8HpnJ3tBTI2BaxRMPuyJPIOJwbz56b9qBe1QnGtZQZAhTme6fd7H0t niTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZmqwHBJQ; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r14-20020a17090b050e00b0025004bcf6casi35509pjz.4.2023.05.16.13.27.34; Tue, 16 May 2023 13:27:49 -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=@kernel.org header.s=k20201202 header.b=ZmqwHBJQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbjEPUWB (ORCPT + 99 others); Tue, 16 May 2023 16:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230398AbjEPUVx (ORCPT ); Tue, 16 May 2023 16:21:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 862819034; Tue, 16 May 2023 13:21:39 -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 0440663620; Tue, 16 May 2023 20:21:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ABAAC433EF; Tue, 16 May 2023 20:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684268498; bh=bIicD6gRU90W8lIoeCPzUX3DM76ZJNapL2GUNon+oYc=; h=From:To:Cc:Subject:Date:From; b=ZmqwHBJQbGjxtCnjYVmgoNPMHvdH3Sk8FKUccNpdIPHjNwR1R6jeSZuWBTf5c/8CB gfdIWCqrVH9j1En9uWb9amUM2zyHPtmNNrdviVXyraoUXVMkU+WG2eYhjRnoyGgqJD xT8zoZYYhRKDnmC9tr7zLyo7S8sWOq7T0rZSRLYOi/5twWbh3ddNw4MAVM/RzezIzl MUFSJeg0qdydkXR0AYJHygwU7tIc1dHNWSm13r5i/9NrkPQw+rTdKIeQrOoCPNjqUm AMJhDZWQ2f/GN/Fl1nuQk+q7ZLk7dOChocIVEVPxMm7RZc67LGi+JuU7zRfJpd2LP3 GPCGmELN8gOGQ== From: Arnd Bergmann To: Paul Cercueil , Harvey Hunt , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Arnd Bergmann , linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: rawnand: ingenic: fix empty stub helper definitions Date: Tue, 16 May 2023 22:21:24 +0200 Message-Id: <20230516202133.559488-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1766083914738563012?= X-GMAIL-MSGID: =?utf-8?q?1766083914738563012?= From: Arnd Bergmann A few functions provide an empty interface definition when CONFIG_MTD_NAND_INGENIC_ECC is disabled, but they are accidentally defined as global functions in the header: drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: error: no previous prototype for 'ingenic_ecc_calculate' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: error: no previous prototype for 'ingenic_ecc_correct' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: error: no previous prototype for 'ingenic_ecc_release' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: error: no previous prototype for 'of_ingenic_ecc_get' Turn them into 'static inline' definitions instead. Fixes: 15de8c6efd0e ("mtd: rawnand: ingenic: Separate top-level and SoC specific code") Signed-off-by: Arnd Bergmann Reviewed-by: Paul Cercueil --- drivers/mtd/nand/raw/ingenic/ingenic_ecc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h index 2cda439b5e11..017868f59f22 100644 --- a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h +++ b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.h @@ -36,25 +36,25 @@ int ingenic_ecc_correct(struct ingenic_ecc *ecc, void ingenic_ecc_release(struct ingenic_ecc *ecc); struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np); #else /* CONFIG_MTD_NAND_INGENIC_ECC */ -int ingenic_ecc_calculate(struct ingenic_ecc *ecc, +static inline int ingenic_ecc_calculate(struct ingenic_ecc *ecc, struct ingenic_ecc_params *params, const u8 *buf, u8 *ecc_code) { return -ENODEV; } -int ingenic_ecc_correct(struct ingenic_ecc *ecc, +static inline int ingenic_ecc_correct(struct ingenic_ecc *ecc, struct ingenic_ecc_params *params, u8 *buf, u8 *ecc_code) { return -ENODEV; } -void ingenic_ecc_release(struct ingenic_ecc *ecc) +static inline void ingenic_ecc_release(struct ingenic_ecc *ecc) { } -struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np) +static inline struct ingenic_ecc *of_ingenic_ecc_get(struct device_node *np) { return ERR_PTR(-ENODEV); }