aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/files/drivers/ata
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-10-09 16:44:30 +0200
committerDaniel Golle <daniel@makrotopia.org>2020-10-12 11:31:19 +0100
commitaee081e62ef8b79f7ea18eac3e66eddcfd03e00a (patch)
treea545b833d26404a16da35c3f48e7943632a51bb4 /target/linux/oxnas/files/drivers/ata
parent6696fddfd9167d3d53cf2dc3ba8f9ad4c9aaeae9 (diff)
downloadupstream-aee081e62ef8b79f7ea18eac3e66eddcfd03e00a.tar.gz
upstream-aee081e62ef8b79f7ea18eac3e66eddcfd03e00a.tar.bz2
upstream-aee081e62ef8b79f7ea18eac3e66eddcfd03e00a.zip
oxnas: fix qc_prep return in sata driver after kernel 4.14.200
This fixes a regression after a kernel change in 4.14.200 [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=306a1c5b5683c1d37565e575386139a64bdbec6f Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit f6ca57e4f40528a8a0103c9f0e9647a2e11d10c3)
Diffstat (limited to 'target/linux/oxnas/files/drivers/ata')
-rw-r--r--target/linux/oxnas/files/drivers/ata/sata_oxnas.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/oxnas/files/drivers/ata/sata_oxnas.c b/target/linux/oxnas/files/drivers/ata/sata_oxnas.c
index ecfbf5f01a..4b162cc1f0 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)