From patchwork Tue Oct 8 07:36:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 175463 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5349319ill; Tue, 8 Oct 2019 00:36:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4E6tZW+dQlRE6DwWlfJSkANRSRtXGv9Fh45BIYw3Hhwr7m+/V10QAY/Iw8gRY5UiwqTeI X-Received: by 2002:a50:a5f8:: with SMTP id b53mr32595754edc.39.1570520218664; Tue, 08 Oct 2019 00:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570520218; cv=none; d=google.com; s=arc-20160816; b=hX5RCnQjmyonclGvGCqF4Ru6GQ6YMh34r8J7PwL9Ox0j1wjI1aiJEAqHTjHU7cUEIO lPuga7Z4+BiLubBT/Vqnz3a3I/eCOQQ4ZvNUzjOIyHiqJ31nB/klh9uw5AD+aujfLsj3 uZUqElO8d2R4FY0o6HJ9B4enREhT6qUbDc2yb07970d2TZL1QoqqUb/6LdQcccl+Kds7 XjhxvoInBJeoOHGf3fpWSda/Ri/1XIUCsBpSZUk8frNTaZ+fJmpCXYYu5UzV1Iw56USV 0is4hi3zWc4qmh+Z+lLn8Qn+mQCVgUSe7n2iijGChWTCfwfO5y0ltN2k96HQ2nNhTAb3 wxGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GBZ0mxqe/NxQbzBLu74NtJ4Wn58oJWqEikrswJYJonc=; b=C7p4KYH4WgCY2luKcaU4+NR3dwryfPEDebnidp/attne1Diyu70wIkZjOaWjQDS5Lt GaU7t7f3j2mt1nPgIiJrV+yoVO2td97Fpllx+7IRUqcAS5IkfhdoVAfvJdyeUXuc2yDo 9HYP3bMuI/C9Zndd+XIsz4Rn2FlZfK6QG+7Cw6G98SQksKBRQEzW/qk5jNQrLOFDFCE+ FpwFUyWPjl3mckvI2QvlhODAwpXLL80SdcpzbuqcoQMJaTpwAqII7dQlYjSDcGNuq49l LsH+YcyTKB3nwAIQJO1RRFCfZn4AH2tY7XULp7HWFbHJxW1vC9c9VBfBlhklOk/LeYTx gqlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si3005750ejf.121.2019.10.08.00.36.58 for ; Tue, 08 Oct 2019 00:36:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-watchdog-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730167AbfJHHg6 (ORCPT ); Tue, 8 Oct 2019 03:36:58 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:44647 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729740AbfJHHg5 (ORCPT ); Tue, 8 Oct 2019 03:36:57 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1M9W78-1iCDjs0OqS-005VR9; Tue, 08 Oct 2019 09:36:36 +0200 From: Arnd Bergmann To: Wim Van Sebroeck , Guenter Roeck Cc: Arnd Bergmann , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] watchdog: cpwd: fix build regression Date: Tue, 8 Oct 2019 09:36:16 +0200 Message-Id: <20191008073634.290255-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:e0lTh4PYIS+uOwLuEcT+6SHvLxiPJVb0x3syccCvfXdySprRihH qEApwBNgPs+3ElpfxURB1l+2SkpYZBzguc9t/iIdh765204J1l61APY5bO6/SORe0kenS26 LsZENXIen+9F1wEDEhyLYG0de6gqaq1/s8vGQ48OmnqHs+DPZ5GZYKV2KygqKckQ5hw9IV8 sn5eQyWj8nvzSoxnt3C4A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:WiFGJjr5i6k=:FtjrVF5t6utKSO7CsTSnCd 4l2xCl0MSd2jjdiJqEVcObg8c0JhZnWJxaocwfZPUmt3AJCjY2Nk8YIlhunZ/IAQj784BlBEj egp0w2fA6NYSGNzEUvVIy9AW1d1KLGuUP1hUN8eD64PSIr8SULsQ4KyxTPnv642RuctQO46Kj NVB3YNRO553/D7ot42tbPo/zs027WcqljgJUDsZ0q2IGEWd2+chgAjVT9sgTzCy88S4Nxnuiv Ar+Ipt/e0x1j9DBcTk//BqUzz5n9yz26/9n1nxsdjwcuD3s50kpzdJpu1YLE85qt/fbycmWM2 dTWj4CGrXf4dIk+3cYVJ4TWJcOh5rGzt5n7pNDgvoIfr9yg2rZnejtHXFZahLalR8sfAou9Qm GsZaU8sb24ndkTOkb7wbIP0w3wSIFxWsLGOGHAlTUDIOWeY8yY+AUHb3qPy84DisSToXdVwIu GCxuEvlkBOwvUg0ERthxan4MFHqvEg3TDQys5/3KiUZ0/+qvVGwNV3aOEYjnwLUzPAaeaJl7t t5XM+GG+LqDva7z3ZsBOsT9JBntiB3gfy8L6l1j8o6OP3A99hH9zNBnv0bVJjTYeqn10HznH2 Xdm0NRLSbw+EsONin+hJEI2MmetjnEqv3ushgvDzcSnKvanplZFH5Yotbe14P5jDWZCc0GJLy f4KG0ekCBYKnCt15StYAEx1EbCxAAVtCj5Bix5q4PfGzEApp5O4uplas4V+wrMtEZH/nydrCW rCMLgp1SqBdmn9Qrc5JKRK5pIN/Kfrrm4ERf8kAV9mMvBkAvWP2d2h+J40GrAO38+S60NYEQF 6zC8gIgxZa23e7p2eHmQktY2hIKVBAeg/oRFxqVNtXodqf1mY8IhtiSE06pcZbqFKcYOx6kWx QjtaA8O5imqxS1Uuxkng== Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org The compat_ptr_ioctl() infrastructure did not make it into linux-5.4, so cpwd now fails to build. Fix it by using an open-coded version. Fixes: 68f28b01fb9e ("watchdog: cpwd: use generic compat_ptr_ioctl") Signed-off-by: Arnd Bergmann --- drivers/watchdog/cpwd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.20.0 Reviewed-by: Guenter Roeck diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 9393be584e72..808eeb4779e4 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -473,6 +474,11 @@ static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return 0; } +static long cpwd_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + return cpwd_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); +} + static ssize_t cpwd_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { @@ -497,7 +503,7 @@ static ssize_t cpwd_read(struct file *file, char __user *buffer, static const struct file_operations cpwd_fops = { .owner = THIS_MODULE, .unlocked_ioctl = cpwd_ioctl, - .compat_ioctl = compat_ptr_ioctl, + .compat_ioctl = cpwd_compat_ioctl, .open = cpwd_open, .write = cpwd_write, .read = cpwd_read,