From patchwork Fri Oct 9 14:44:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1379254 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=adrianschmutzler.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=NK0GLCWU; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C79t62YDBz9sTR for ; Sat, 10 Oct 2020 01:48:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=nU7I/3EdXVg9jeH6mnhipslnX23UX/lxx/duIHz6Jqw=; b=NK0GLCWU10FugmxFTv78t79Jh5 fO5+ZPy8tUnwDcCBi0NsqqvuuBnRj7/3excPIaQQiq/d6OJx+2rjS2LcWce/+OkUpxEQun+PgQlIn byr+qhgjF/bavk4NYZzYJAiQYYMRFhgOZqHJ7wSGS2BBEK6pDTDcUc1c9SKby4DvbOT8CE9VoT2OC xkUwm8cmIJ3LMC5N+Q244og/SEIdQlFYUpb8hKua5riucJJ8TRuDyzW+Ay9N5XriyILjoR0HqH0Ew YvNNyAHbFsZ/rAdilcZYsF3dQdK2HIwMmQv/uZqxffBs8C759bvzAZwHTQreGDUglAiqhen3zFNX2 gcUcq7lg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQteS-00008i-8t; Fri, 09 Oct 2020 14:45:44 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQteO-00007h-LM for openwrt-devel@lists.openwrt.org; Fri, 09 Oct 2020 14:45:42 +0000 Received: from buildfff.adridolf.com ([188.192.134.246]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MtfRv-1kDUYr1bDT-00v4JB for ; Fri, 09 Oct 2020 16:45:34 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH] oxnas: fix qc_prep return in sata driver after kernel 5.4.69 Date: Fri, 9 Oct 2020 16:44:30 +0200 Message-Id: <20201009144430.45966-1-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:vEIa5ilvNB6KqeXwuBqm8rqC0W8OEGpX7zqGWaH03IyRg5w4K0M aNhbsF2p9Xct2voWsCOAKTokZbZklYdkdOTjshlFWAIXr6jmwX8MzU8BQimWhnb19IuQk9w Qf5TqoNSuMSxWs5/IbNpSq4F+L8nfvLSSpgKpL9bvdIZxXs/2AUXCfb99528b0FX3SuVkxv Wdb0Pq/bbsf/ITND424Ew== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:QLplRKvM9zw=:lTJeWwnFvIh2CaLVXR6pAl B7ZpeKt6wN2Z1e3iQTIQ0M+PSiseoTkdKjClIwRMA1L1FgoA6By65uXS2eb0sqDlAbxUqkJii F2Zq0qLzA4pMrbfb4P2OV5VU3eTbF8jckq3IGM32Wt42Ly0UPxoR3Hfs2xgx61ElfkW43u1mc kw1uyO8r2ppL8yzgieO3TouSf7UyBxkRdAUZeO9xNdMuWAmfY/JyRB9pArtA8cSScBGCcfO3i WBadfvsNv/eQSs+Npnhu8lK4DrGnXxvQRAhtLp0k/1GCPdPJziUAaeVH0PhcG6KEXKT9oBMDc voBiAlQQMeVcSgIb88x1OkEwIyaNMLwE/cp469+dg6TA2s+6eGby15w/jPFF/97EliE/oNThV V87vyXx/nHo0+zwV6WzZ6223cTqfA5lGEppOMZ/A5YULMi4GNjnaPGMGghP75UPzzhYCYfLwU inRGzEiZXJDREbNxqJPs3WXXWkOSlhd0Fo4SO1SWX3US0vhDUnEeqB7m2SgWf00GsYL3eZ2er ZMwdtS+yaAd32FG0belo9xgUV31LPJn6JO/WzAqt0eKa74lCFYlQuWtfAf7zXIky5Kel9ztGf PFVfstP6wmbrT6lWg4PnB8eI509pAwEgXtnkSKTVx77PshWT2ZZjP2HcGu3PVpUfJjCx2YcWk JTRpG8R1XHAde/Qv+ebi2Yrrm0TP6IDbKd3MMpFNnGi/2rdr0xkUHb0GX9zE9l7YaSUO8AKlp kd1nXB1Qo7mfcWNv+XppJJ/6FK9w/ZC6ialN3OZMyW+tPsocmojMs+BHmkWdS3tm43d/lCoqV OS+a4AHcwlbhLqnkOo3XYv2B1yw+9MHu0xvzpsUJaMXJ7+IAWRPjBCKgqxIaHOzP5GoIkizEH M+XShVMwqeXMfW+j4pCQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201009_104540_929329_ED2B4D19 X-CRM114-Status: GOOD ( 14.37 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.126.130 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.130 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This fixes a regression after a kernel change in 5.4.69 [1] that led to build failure on oxnas/ox820: drivers/ata/sata_oxnas.c:2238:13: error: initialization of 'enum ata_completion_errors (*)(struct ata_queued_cmd *)' from incompatible pointer type 'void (*)(struct ata_queued_cmd *)' [-Werror=incompatible-pointer-types] .qc_prep = sata_oxnas_qc_prep, ^~~~~~~~~~~~~~~~~~ drivers/ata/sata_oxnas.c:2238:13: note: (near initialization for 'sata_oxnas_ops.qc_prep') Our local driver is changed the same way as prototyped in the kernel patch, i.e. return type is changed and AC_ERR_OK return value is added. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e11c83520cd04b813cd1748ee2a8f2c620e5f7e3 Signed-off-by: Adrian Schmutzler --- target/linux/oxnas/files/drivers/ata/sata_oxnas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/oxnas/files/drivers/ata/sata_oxnas.c b/target/linux/oxnas/files/drivers/ata/sata_oxnas.c index 64231a8c70..b55995ccad 100644 --- a/target/linux/oxnas/files/drivers/ata/sata_oxnas.c +++ b/target/linux/oxnas/files/drivers/ata/sata_oxnas.c @@ -1802,7 +1802,7 @@ static inline void sata_oxnas_reset_ucode(struct ata_host *ah, int force, * Prepare as much as possible for a command without involving anything that is * shared between ports. */ -static void sata_oxnas_qc_prep(struct ata_queued_cmd *qc) +static enum ata_completion_errors sata_oxnas_qc_prep(struct ata_queued_cmd *qc) { struct sata_oxnas_port_priv *pd; int port_no = qc->ap->port_no; @@ -1848,6 +1848,8 @@ static void sata_oxnas_qc_prep(struct ata_queued_cmd *qc) /* tell it to wait */ iowrite32(SGDMA_CONTROL_NOGO, pd->sgdma_base + SGDMA_CONTROL); } + + return AC_ERR_OK; } static int sata_oxnas_port_start(struct ata_port *ap)