From patchwork Mon Dec 16 17:45:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181792 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4702963ile; Mon, 16 Dec 2019 10:50:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwMDZq1obO+lKA6f7W4PR8PFW+n1H7ARvOibf/6fvIbDTV47zLZakv73PqSwZoWUN2MuilZ X-Received: by 2002:a05:6830:1691:: with SMTP id k17mr34283615otr.282.1576522229769; Mon, 16 Dec 2019 10:50:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576522229; cv=none; d=google.com; s=arc-20160816; b=HUYB4FhPvU+qms2ddW9zUt93yiMLKMDKnzyAnGfZSSqC4+WUlJRU3RuOtY4juKmf99 +xaVHbK3N6xZlMY5CL+PkZsJRrqzKFDSJvQuh605jM5g2grivEasJ2w/O3k5EWx8ZkdW pL42PT0eMPWGYRtHem5IeCzqxDOEDe5ycBFszIESPLmaiWeylINyQtWNB1omHaq3GDxK 1e2CwDffGQR5OmnA1qfLafTcIKNnQoWgkdXdnRuGXiaAUY8FiaY4K26CzHyBstkWRrtJ QDQ5Yu4uUai+6jPkKqCmHTxzUYp3PgrKLdD1em68ic4c55JRzSkEFHeEsWw8bKv1QHF7 X7QQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VxTgn0IHLIkoEeJ50HZEcqGLjXf7X3mGhsV85MERphk=; b=rX/XPbImJbSeCVkWm1ILKh4FqsJdgtuwTSvfDz7DrlVhNte4j/q7fpJS45mh1daq2A TCc/LZn6Ag6UfLe1ORwjSqCCvHdCyjeZ8jkUXNKWIXOywn1v1zgN3eTTxlp+FzVdd2fp BTpa8yj3o2A1NJFBeX9dNN+aQlwGM0z3vT2KGlkqW/jUMyKmY0YRDMhFbjTEnIPmCliA KfnvC4gfT3rCVRoXLBQkTp9elIcCOWE6EduB/RA0r4s+T9XFIL2DwyyB+WIZuO63GDdm XRUnV2D4cMyDIcbQZTaSPSCLa9sUFpkJIBXXe9IoCfpQHk91jBUWt7gA1xMjIkM6DkJK noSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vyjE06+O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 c13si12575333otd.109.2019.12.16.10.50.29; Mon, 16 Dec 2019 10:50:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vyjE06+O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727831AbfLPSu2 (ORCPT + 27 others); Mon, 16 Dec 2019 13:50:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:41904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbfLPRvi (ORCPT ); Mon, 16 Dec 2019 12:51:38 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 36C42206EC; Mon, 16 Dec 2019 17:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518697; bh=SQ+63E8dRGVFKoxnKVDyx3YwGbAdRpIHTG3O4filuZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vyjE06+Oszy3e0sG4+hjd03zqxSFaxhN5Z9VC3VTcG0hVLPIaQBRMRpGdrMy1SbPa 50yEQLpLYSjm4qsMJcYSA4Q8zZQed3UWI3Vk/RDqzwlEL6ZtEQUyJg65Si13jvy7c/ Bz2CgIhx/2RuLxgxIjlzZH8yZqFMiUBbDRZEv3fo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Chanwoo Choi , Sasha Levin Subject: [PATCH 4.14 030/267] extcon: max8997: Fix lack of path setting in USB device mode Date: Mon, 16 Dec 2019 18:45:56 +0100 Message-Id: <20191216174852.220072682@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit a2dc50914744eea9f83a70a5db0486be625e5dc0 ] MAX8997 driver disables automatic path selection from MicroUSB connector and manually sets path to either UART or USB lines. However the code for setting USB path worked only for USB host mode (when ID pin is set to ground). When standard USB cable (USB device mode) is connected, path registers are not touched. This means that once the non-USB accessory is connected to MAX8997-operated micro USB port, the path is no longer set to USB and USB device mode doesn't work. This patch fixes it by setting USB path both for USB and USB host modes. Signed-off-by: Marek Szyprowski Signed-off-by: Chanwoo Choi Signed-off-by: Sasha Levin --- drivers/extcon/extcon-max8997.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 4a0612fb9c070..b9b48d45a6dc4 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c @@ -321,12 +321,10 @@ static int max8997_muic_handle_usb(struct max8997_muic_info *info, { int ret = 0; - if (usb_type == MAX8997_USB_HOST) { - ret = max8997_muic_set_path(info, info->path_usb, attached); - if (ret < 0) { - dev_err(info->dev, "failed to update muic register\n"); - return ret; - } + ret = max8997_muic_set_path(info, info->path_usb, attached); + if (ret < 0) { + dev_err(info->dev, "failed to update muic register\n"); + return ret; } switch (usb_type) { From patchwork Mon Dec 16 17:46:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181791 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4702315ile; Mon, 16 Dec 2019 10:49:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxOCpOjQYdgcICLwetci1PagAqptSxzKTntE7QW56n3o0ilaaEzZdjxN9QHW9zcwcEXD1xw X-Received: by 2002:a05:6830:1501:: with SMTP id k1mr34525434otp.209.1576522193670; Mon, 16 Dec 2019 10:49:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576522193; cv=none; d=google.com; s=arc-20160816; b=u6l+cGTcoLUzQPQII255MSDEEj5QhUX99RZ/xD7NZlsmW3ibuUk9CqesR7dhdXZXWZ nvZnHgDC0NREawW5IWm0s93AlI3kwbV3AqwWDj3phmxVwsHjUMMTZUxaFREf1PcNqWr0 zcXhkGVpdEyQKq+Kfycv30EIPEzu5SNag8dTHLnsNcsm6Stu+MuLhuU531iBImmmkT8N Az+EkQmQ47pK57eBXk+7O/R2NEpwO4cYvJoUsAxmcx730X6P70JA4SEtq+fgpBTkxyMM 1CmeYIw/pRV4KHpTLrjOvivkJtSP2RUAd/AWB5UXOXaVZSSADopnzNwCz0U8flyQmat1 zWaw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+mfnqcl/BRaMBJ31XvXXSyKaJBXC8gQsTqFrN+w4PEc=; b=O3QeueTSv3zYYOX8gEBWx7TsiP1nTiqLY925oHn2gzcx/EeM/iUqxacJYjaHfiWIbW DVH2sKGy3HsAdHBgTBSNJSRMVFmhj3FC5Lcw9KaMQb4cFIPu3LGNI5jyE7xDX/XFQ6Xq kDtkvz3VqIueghP8ASwOx1AIu75eOBLCH9PzK8fYSHtvMRtGwbHFX3AaWWGH/03FRoVd UEG0k+9pebVE4n3ZKlSt3hshGfOxtHYmoqL7h4AtpiTCRjMLipoaX6x6iD7JUWtHfmbU vY0br+evBWJM1btZy2RyOr+quD/32S6bCzGvX1l/zNafSgO932WmtDIr5iGrSNpFvT5q 6aTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e5DAQhB1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 w4si11126559otj.148.2019.12.16.10.49.53; Mon, 16 Dec 2019 10:49:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e5DAQhB1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727485AbfLPRw3 (ORCPT + 27 others); Mon, 16 Dec 2019 12:52:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:44216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbfLPRw0 (ORCPT ); Mon, 16 Dec 2019 12:52:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 995362166E; Mon, 16 Dec 2019 17:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518746; bh=cZRXYZr3dnqdd2ZANv1oCOypDbcNrsP6ksZp+LUmUVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5DAQhB1lCE1PQSJBd2cVVWhjrYqF+PDTw0v5GCnxNfLfwvBRt6fZsrSQ03DQme/S 8cn1byg90qOcY1aLAhKXbF2g4yS3pYInIq5/gaHYmW3SPNS5Pxf/iK90LKzEqIDSwQ YAJUkr/vlwIf3sy1JHa+i3TnYmJCKjYkP1iPwke0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cheng-Yi Chiang , Mark Brown , Douglas Anderson , Sasha Levin Subject: [PATCH 4.14 048/267] regulator: Fix return value of _set_load() stub Date: Mon, 16 Dec 2019 18:46:14 +0100 Message-Id: <20191216174853.876135512@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Brown [ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ] The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang Signed-off-by: Mark Brown Reviewed-by: Douglas Anderson Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- include/linux/regulator/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 25602afd48447..f3f76051e8b00 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -508,7 +508,7 @@ static inline int regulator_get_error_flags(struct regulator *regulator, static inline int regulator_set_load(struct regulator *regulator, int load_uA) { - return REGULATOR_MODE_NORMAL; + return 0; } static inline int regulator_allow_bypass(struct regulator *regulator, From patchwork Mon Dec 16 17:46:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181755 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4618337och; Mon, 16 Dec 2019 09:54:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxlWn4kv5sjfcgiNFva2nYWJeYiY0iF/ABV+W75TdPjMGRBHi+K0tZ6eBmyDuSxFZwbqypn X-Received: by 2002:a9d:dc1:: with SMTP id 59mr33745825ots.250.1576518894475; Mon, 16 Dec 2019 09:54:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576518894; cv=none; d=google.com; s=arc-20160816; b=nAOPHuju19UOqgcc4lH81/zS+/OUTfJS060k/ZYFQ8NxM0JPmbyDHrmXePnFaZ4Nmi dS2MZNK+nDqQWoFicKqhCuisVmKEAJ4OjygPqa/DuYulhAQUDsalu3VCv993HCij2uE1 jey5HECwdqKJm03/zrIdI9e8CVUxd94J7JisalYwj3QhkFt8UQMEM2+z/cAN2/pvyCl2 qkXkuOW5Iyv7Dqk7HR/7Jazqd2vlfWDYQvvflP3AB3ob/o5wtxXX9pPSUlQR0JjBgF/5 HwiJpGK9PzFBY4PLTuX3Ep2vRNTpvokhPlYNBoOcrQG1H0CVc31+2Bv5EEwQ9pEAxvVy NkeA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tNX3boPItiqeUyFYqEFkIj2tOBwBKCUoqGW4W3JyoHA=; b=IUWHAi5EMmQgBQjwcyXyG4CoembJEMGJ3XF3bk2nIpojttd8XkLJqcQ/bryXShJVBF +I+AcWY3bfjoN+6rqpf6tGp119NjWKFomjk+QGqPK4pf0pZxHX1oeTMHop4mw8cXpaoZ UxYyZyX/cIVw1GHN0NAh16eRqEQiaxL5i3BCAXahmTYnhoHlQaLQBddYvD/aNzj8apXI W4GBreOCFZORT+8t+BdZ5tx8Tqp7Dn5ZFSGfojFDZogqN19hC6Bl4BMy6i639Rl10edJ sjzJWbp+fkdhh+Zz4jnsMrA6mZR4ZkApsJwk68GqNES0RmjZ7PfJ5H9aPW5deb3AsK8d HKVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EXPX+LgS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 g5si10142589otn.232.2019.12.16.09.54.54; Mon, 16 Dec 2019 09:54:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EXPX+LgS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727969AbfLPRyx (ORCPT + 27 others); Mon, 16 Dec 2019 12:54:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:51204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727659AbfLPRyq (ORCPT ); Mon, 16 Dec 2019 12:54:46 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E840120663; Mon, 16 Dec 2019 17:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518886; bh=/LUzzBf+Yofy0eimmBq0G62TXMndjXspkVTWifPx2yg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EXPX+LgSkLmSOYh/Gzv1LARMhfp8eJ2fHaRGLA8j8du6rfaM0o8s2AwokCgpGxVky 1XB9/IQi2Abl3xO9X/Eij9rTF4JhPmrxQVP2od7HomBtai4E2MK6lnSSHr3Fkaufk7 IVwlzhery7GjUFRSmaNMxhTk3Z/xY05uFAigh3Vs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Rothwell , Vinod Koul Subject: [PATCH 4.14 060/267] dmaengine: coh901318: Remove unused variable Date: Mon, 16 Dec 2019 18:46:26 +0100 Message-Id: <20191216174855.614026608@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vinod Koul commit 35faaf0df42d285b40f8a6310afbe096720f7758 upstream. Commit 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") left flags variable unused, so remove it to fix the warning. drivers/dma/coh901318.c: In function 'coh901318_config': drivers/dma/coh901318.c:1805:16: warning: unused variable 'flags' [-Wunused-variable] unsigned long flags; ^~~~~ Fixes: 627469e4445b ("dmaengine: coh901318: Fix a double-lock bug") Reported-By: Stephen Rothwell Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/coh901318.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -1797,7 +1797,6 @@ static struct dma_chan *coh901318_xlate( static int coh901318_config(struct coh901318_chan *cohc, struct coh901318_params *param) { - unsigned long flags; const struct coh901318_params *p; int channel = cohc->id; void __iomem *virtbase = cohc->base->virtbase; From patchwork Mon Dec 16 17:47:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181754 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4617918och; Mon, 16 Dec 2019 09:54:28 -0800 (PST) X-Google-Smtp-Source: APXvYqwEcJWbbDo+l7PzSm8HgM6lXd5opQTiZ507BtTK8cjh91b8m6IVlQHn+BHQJE30W/gZAxk/ X-Received: by 2002:a9d:588c:: with SMTP id x12mr32031691otg.2.1576518867972; Mon, 16 Dec 2019 09:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576518867; cv=none; d=google.com; s=arc-20160816; b=pEmqqYbGNziEaQVQ+5x8AgNpSIgnDA4/8IH/G0XTRq2fAZxcEyW5N4vF6CaQ+UAkNi 7z846UUiqk2GKBI1/Z8rhNJrPOjqX4pHTPOblLr+9opZHPCF5I8OVXMaaAP4ns64Ozr6 7RDd45Pcjns2mgdhh19oJbrmuvcLS/NJFaSE8sghaunrXz2+4RvdMhscf9s8Mq0nsYKf OLSDFszQHDnAAz11djr5IT3GuvcxfUF3AYbtpXCDdyDChh0O5af/SBiSt2iLOT9+XuQv lERvgDkuc+P5fcBMmHaAiSv7eSuANSelWLeGT1+0B+8lxIKymAZFQZL2npNW3EAI/fw6 6xjw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Eme6cqaRXdxigDjFuSQK6i+ARTk8WaCqnlFNDjEcZxk=; b=IEQy0zexphvFMK/jadb2MUdc93e/2g2BvtSKMEq+vUrB8CBxACrI57gmcH0pkyYY5A aqojJMTU0/VF2ovXqgY2dLe/Nuo5saA49wZhBBlGGKiStLqQcxorJF6mGN9s0px5A3tq Pu9JZgKbCiQXAIvDif2wZ0y/bAD1oUDRJZr0tQz9Ittubd+TsyXDXkfk/K9o21SAbHKb k6OxdB6rmjZB3vGp1CXrSl/caunRQ4QBIz0/x/SnfMGtDRs7w/uvMU6sRRW1Wbd0F46x D5N6jp2DMDZNMFpJ1EjpTYmIKL4ONVmhPu+pUjHR+1LU7Ba54NN05vqEOMhwI1C1DYPU UtSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oHbGoTNj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 g5si10141716otn.232.2019.12.16.09.54.27; Mon, 16 Dec 2019 09:54:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oHbGoTNj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727106AbfLPRy0 (ORCPT + 27 others); Mon, 16 Dec 2019 12:54:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:50156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726865AbfLPRyW (ORCPT ); Mon, 16 Dec 2019 12:54:22 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9168021582; Mon, 16 Dec 2019 17:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518862; bh=RfmMguvOsEmVTvPQcmmNoPaMeAWc9qTU28XzeE79xCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oHbGoTNjQmeP4GqpkQ8xRuW4LHeMqLhJ/LRi7M+plG0ASYWQjZhMM4truSQuqrihV IHBBVV3Y1zCl3AJ5SnlHgfWpAkgEcUAmiTd39xaX7WbUa4wautxZGZbS6YYU3NlkY2 W+ZN+EkDC5xT2fBue+aylul/EQCQCQpRRicRZ42A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Sasha Levin Subject: [PATCH 4.14 096/267] kbuild: fix single target build for external module Date: Mon, 16 Dec 2019 18:47:02 +0100 Message-Id: <20191216174901.982408463@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ] Building a single target in an external module fails due to missing .tmp_versions directory. For example, $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o will fail in the following way: CC [M] /home/masahiro/foo/foo.o /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent This is because $(cmd_crmodverdir) is executed only before building /, %/, %.ko single targets of external modules. Create .tmp_versions in the 'prepare' target. Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/Makefile b/Makefile index d97288c0754fe..4de172b2e1fba 100644 --- a/Makefile +++ b/Makefile @@ -1529,9 +1529,6 @@ else # KBUILD_EXTMOD # We are always building modules KBUILD_MODULES := 1 -PHONY += crmodverdir -crmodverdir: - $(cmd_crmodverdir) PHONY += $(objtree)/Module.symvers $(objtree)/Module.symvers: @@ -1543,7 +1540,7 @@ $(objtree)/Module.symvers: module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) PHONY += $(module-dirs) modules -$(module-dirs): crmodverdir $(objtree)/Module.symvers +$(module-dirs): prepare $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) @@ -1584,7 +1581,8 @@ help: # Dummies... PHONY += prepare scripts -prepare: ; +prepare: + $(cmd_crmodverdir) scripts: ; endif # KBUILD_EXTMOD @@ -1709,17 +1707,14 @@ endif # Modules /: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) # Make sure the latest headers are built for Documentation Documentation/ samples/: headers_install %/: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %.ko: prepare scripts FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost From patchwork Mon Dec 16 17:47:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181759 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4620022och; Mon, 16 Dec 2019 09:56:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwMHlINubhiWKIWL5PQXb62vO3bZMJIBeKfqJI4KInYbjkQInmVKLw9Yc3mn5Da1fTPydRK X-Received: by 2002:a9d:7f11:: with SMTP id j17mr34344974otq.281.1576518990237; Mon, 16 Dec 2019 09:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576518990; cv=none; d=google.com; s=arc-20160816; b=kKr4dAg9+oy7BLTEfPyc5Xa+y06/m/b5Gc7Xua6OHB6DJ6nE1Wg5cF77pLbGPPCo7c Bw+zFwG+h/19387tFya+ihv96ufqpqwlX7FBjbijk1i6icXS1R9gGSG94BTkoOPUXB+N X9F7jUaqBiRi/2UaFCA8qR2m4snsSUF6FU6U2SSKRvTqfL6OLcAwk5tC7GCyhBcQ6Uq3 ETkeJgT3cp3U3EVNRrMdcK+0mUHXZpCKYTKRZ3BSp01xIGhe/+NVaSG3y7Z6Ja0/OQ1w 9iPKkf7cYsYEl8eC061xCCz7xph9WRJZ0bxuo6de/PNAwu/cGyl2XeziL/DREuaAuNyW JMkg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pAnREPZiFocN+LVb2ESNQx2msHnu158DNR8yyEgOKWc=; b=lrcklxu94gc75bhkzSBukype8plXBP7XQ8ug7NKNKpWpjN7wyazOoE+nVvQ0mreUyC xjkxmODd7f3fdCb08iuvAsU9eD/L8pYZHxPEUnOLvL6Zkhoi5upiE7Hdoa66vzfaGWIr L+TcPCCvwtFUGUZbf1y3P3HT1dJ1O3I3lFZSVp4YSP33S5+IWjinanz1JAPESaNnS6A+ MN2Stq/K6Q6Cy8UG3Kk+j6A5THPto7JnXGpKyYY2zarMo6gnJQgxChmu+nHqDcwy5Ys8 bw0bVnCmd2NGZpOIowy+Eb4KLrPLylW8YnL6moCD3ojD6lBaS+OFMEEuPaw1Seu93nZG aClQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qVa+XKYQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 u4si11218028oig.200.2019.12.16.09.56.29; Mon, 16 Dec 2019 09:56:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qVa+XKYQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728000AbfLPR42 (ORCPT + 27 others); Mon, 16 Dec 2019 12:56:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:54556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbfLPR40 (ORCPT ); Mon, 16 Dec 2019 12:56:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A102B205ED; Mon, 16 Dec 2019 17:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518986; bh=L1ZJnOukyG9pbLSqdTAzhSKY7W/Y+Cjvd9R5hzHLJUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qVa+XKYQZFgQE7ekcwnCd0Rx/iR5PahsrlnjAulFvuKgreEaHCxxDE0trVkOOUwRg 18u1YS01VMoygtlST0qQVdSmblasMaQvBLzqa8Xegnz3IJPt8V0Edc8ECPuwCveUjP Ie1G8tNEMjqSvieUtWqooiCABkTzl4iwFTSROcug= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Herring , Linus Walleij , Olof Johansson , Sasha Levin Subject: [PATCH 4.14 100/267] ARM: dts: realview: Fix some more duplicate regulator nodes Date: Mon, 16 Dec 2019 18:47:06 +0100 Message-Id: <20191216174902.196585623@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Herring [ Upstream commit f3b2f758ec1e6cdb13c925647cbd8ad4938b78fb ] There's a bug in dtc in checking for duplicate node names when there's another section (e.g. "/ { };"). In this case, skeleton.dtsi provides another section. Upon removal of skeleton.dtsi, the dtb fails to build due to a duplicate node 'fixedregulator@0'. As both nodes were pretty much the same 3.3V fixed regulator, it hasn't really mattered. Fix this by renaming the nodes to something unique. In the process, drop the unit-address which shouldn't be present wtihout reg property. Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Olof Johansson Signed-off-by: Sasha Levin --- arch/arm/boot/dts/arm-realview-pb1176.dts | 4 ++-- arch/arm/boot/dts/arm-realview-pb11mp.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/arm-realview-pb1176.dts b/arch/arm/boot/dts/arm-realview-pb1176.dts index c1fd5615ddfe3..939c108c24a6c 100644 --- a/arch/arm/boot/dts/arm-realview-pb1176.dts +++ b/arch/arm/boot/dts/arm-realview-pb1176.dts @@ -45,7 +45,7 @@ }; /* The voltage to the MMC card is hardwired at 3.3V */ - vmmc: fixedregulator@0 { + vmmc: regulator-vmmc { compatible = "regulator-fixed"; regulator-name = "vmmc"; regulator-min-microvolt = <3300000>; @@ -53,7 +53,7 @@ regulator-boot-on; }; - veth: fixedregulator@0 { + veth: regulator-veth { compatible = "regulator-fixed"; regulator-name = "veth"; regulator-min-microvolt = <3300000>; diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts index e306f1cceb4ec..95037c48182de 100644 --- a/arch/arm/boot/dts/arm-realview-pb11mp.dts +++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts @@ -145,7 +145,7 @@ }; /* The voltage to the MMC card is hardwired at 3.3V */ - vmmc: fixedregulator@0 { + vmmc: regulator-vmmc { compatible = "regulator-fixed"; regulator-name = "vmmc"; regulator-min-microvolt = <3300000>; @@ -153,7 +153,7 @@ regulator-boot-on; }; - veth: fixedregulator@0 { + veth: regulator-veth { compatible = "regulator-fixed"; regulator-name = "veth"; regulator-min-microvolt = <3300000>; From patchwork Mon Dec 16 17:47:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181756 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4618558och; Mon, 16 Dec 2019 09:55:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzKI5HU2vnzJCURqpWowLot73zoxKoNvjvcXTEp8mvMOqgSNxFY8q4DlcbXWx2u/CV+O4pE X-Received: by 2002:a05:6830:18d7:: with SMTP id v23mr31673170ote.213.1576518909774; Mon, 16 Dec 2019 09:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576518909; cv=none; d=google.com; s=arc-20160816; b=gaLegglqp/edZDuJDJ0zfhWB2GjvBF1R9Xn5fEjOLYqbMhbVa3fVdFF955j5VOmYZO iTSP/EsGNEiGy4Tg28EK0k4hy6n++TW1nsUQHV97vbL2B+toCHumOo1Ugt2Jt9OcUWu6 N/JTHlWXbblnlO+I+sC5mGED0JIQug2x1ePrf4P8ltqpSjy1sx1zUJNeh3D7lD8eRXyv zOIa5G92u1fHQp/Grla89c8ZsmL2csdDxx5cjqRy4BYDYmPJfc+lIS/cU1YeBc8z4rBl 89dr++GoRwfM9YtTebkaGHXbSOdHZj/hO07EkEVAsjl9unBk6QCKVk3EBPd4uZuduMno 6rxg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XZ4v1tqX9cXHHAWTJMvDdiz9HgmHUXGJnlvXC/MoM0g=; b=hxg+g8xv1T+JvDM81l0/OQZGyl01CvEnQort/BfTfd1F7LjNEIsnxXsLkdfF9IHeca gWp0mykXec9jAAty5suNkG4aeT4iYtvA+PLshx4azUzJTHjfnnGdpctrBLddp/DC4Lxc RW9TYn2Twz0GmrThIlhhivcBqUTKN8Qwf4bn58jkXqAWIthquMZH4RRBFMbt1weWSntN QA8H6uC4DIE8PIRTFg/A3tddp0CHgSjY3jGNls6C9RbVgbH1tkNsFzC76bkCIItDbNuo qRJsOKZiZPqmqO3YWPgxkiruRVHZURWkq7i4N1nGFuGI9150Oo75nFnLJauca0vWUBZu 7J1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nc18RJx9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 g5si10142589otn.232.2019.12.16.09.55.09; Mon, 16 Dec 2019 09:55:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nc18RJx9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727758AbfLPRzI (ORCPT + 27 others); Mon, 16 Dec 2019 12:55:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:51962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727728AbfLPRzG (ORCPT ); Mon, 16 Dec 2019 12:55:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9322C205ED; Mon, 16 Dec 2019 17:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518906; bh=02XFS/OU1KS/UCytUjHWP9OXSM3pQQE2fb1PRIdLJOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nc18RJx9aP3+Jyyxs6wzld7ewxVd4Eb+KMtq48aR/bBiz/4xIRQeYC/96N1EpLDkw bre9vEZoqoKi1ZuiA52BPrB3TT0Bf8LfcRnRLWoEk0uS9XOIdCWy6dlczA10iKUGo3 Gtj+MspTMC9Rf6YN59B2+6iNhWaqQ4NNE+y1lw4A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Will Deacon , Sasha Levin Subject: [PATCH 4.14 116/267] ARM: dts: sunxi: Fix PMU compatible strings Date: Mon, 16 Dec 2019 18:47:22 +0100 Message-Id: <20191216174903.063059705@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Herring [ Upstream commit 5719ac19fc32d892434939c1756c2f9a8322e6ef ] "arm,cortex-a15-pmu" is not a valid fallback compatible string for an Cortex-A7 PMU, so drop it. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Rob Herring Acked-by: Will Deacon Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- arch/arm/boot/dts/sun6i-a31.dtsi | 2 +- arch/arm/boot/dts/sun7i-a20.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index eef072a21acca..0bb82d0442a59 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi @@ -173,7 +173,7 @@ }; pmu { - compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + compatible = "arm,cortex-a7-pmu"; interrupts = , , , diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 96bee776e1456..77f04dbdf9967 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -171,7 +171,7 @@ }; pmu { - compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"; + compatible = "arm,cortex-a7-pmu"; interrupts = , ; }; From patchwork Mon Dec 16 17:47:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181757 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4619321och; Mon, 16 Dec 2019 09:55:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxuCnbOhQHeJEHoLdbkHYmeCRoy1tv/iMeTZM5gB4nOgLa/iES9E/9ecL0dzW+fob7fCjJE X-Received: by 2002:a9d:6e12:: with SMTP id e18mr31251341otr.47.1576518951306; Mon, 16 Dec 2019 09:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576518951; cv=none; d=google.com; s=arc-20160816; b=R3X3qu78AIX2x5phH/k1erlniwCk1cOTxTIS6+fxlby3+3C816oF/NMdVE3leBcYyO SBFuN57Ui8q/UfDjuNKQvBkqwVq2+3hSymNQaLMUCvni4q24O7oNejWC8O90gP+Lz8Jh P0afFy1TlqsN9dmM0M26uf3lQHd5GN+truPdbpb2uIW8tKciKl5oadwAOtLcATU43Usw peIMRvX6f7KHCgEg6XW3+Q+KxOAP5EnGXRWOPEkwBxMiZXFNVBVJ5XP+s4+75HkD7vTT IJW7exwrAzQbvkzqR5cruYZ1fvUfD9G240LfULINtKGdlN/KRbj++UFqGkFuZcF0TVkR jrrg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6yDiT31pLTZA5bGI/hzkeEKXQ+0nYjgT2FHD22Vga7Y=; b=MaUYXey4WhMFpNJ3IEnueLRetfF2wyQBBc4VJFppFGoTYpl9h+LCEyOsv0cIPKf7JI yrMJy7NH7yXQBB0XrhE8yBt0OHkYjucFR/RZOUYsO3MRxfQZs5Tyf7TVzX/KIVG8Fzy7 xneZRbblzRnPlYRlxKAePjBlZwFgzhKS2UFlAWF+drbitiqk2CC8rBRuhMoppHBD4sv/ G5kg7dbqs/3U9lhOQlxRFWRflwjmX0UvD06gEj9x9BNNESyZ2/uS7fOOSXQ0+7YV7Jo7 XGX1DAUhVIUnsAwu0aZABXHvtSMqc12+5oV9wUnRDjuz/KY9PvrNooL7H7N4pMOEVZAf 4HDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TZYqAloX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 r132si10773293oig.263.2019.12.16.09.55.51; Mon, 16 Dec 2019 09:55:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TZYqAloX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727923AbfLPRzt (ORCPT + 27 others); Mon, 16 Dec 2019 12:55:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:53196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728074AbfLPRzp (ORCPT ); Mon, 16 Dec 2019 12:55:45 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 370492176D; Mon, 16 Dec 2019 17:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576518944; bh=cvPAg9I2YwVLNkWL6x0/cKoqr1AmKIBCDJShQFg1R7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TZYqAloXdJsD6O/mVSJ5rS2gnuKzoHMZCp2NOLlQEYcOtuQ3MENUpyWBxUfZ7tOwF FAL+1y/sJKvR95o2HRgYfK4lSwMNEWyys+e1U0ekXY+QcnuWmRgkHsvxHD+uKv2dQG wk9lIP5lMSI1w2B/XGyGXe7LJAX6hqZ2Lb+tWP4Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Mathieu Poirier , Mike Leach Subject: [PATCH 4.14 130/267] coresight: etm4x: Fix input validation for sysfs. Date: Mon, 16 Dec 2019 18:47:36 +0100 Message-Id: <20191216174906.442408533@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Leach commit 2fe6899e36aa174abefd017887f9cfe0cb60c43a upstream. A number of issues are fixed relating to sysfs input validation:- 1) bb_ctrl_store() - incorrect compare of bit select field to absolute value. Reworked per ETMv4 specification. 2) seq_event_store() - incorrect mask value - register has two event values. 3) cyc_threshold_store() - must mask with max before checking min otherwise wrapped values can set illegal value below min. 4) res_ctrl_store() - update to mask off all res0 bits. Reviewed-by: Leo Yan Reviewed-by: Mathieu Poirier Signed-off-by: Mike Leach Fixes: a77de2637c9eb ("coresight: etm4x: moving sysFS entries to a dedicated file") Cc: stable # 4.9+ Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20191104181251.26732-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -667,10 +667,13 @@ static ssize_t cyc_threshold_store(struc if (kstrtoul(buf, 16, &val)) return -EINVAL; + + /* mask off max threshold before checking min value */ + val &= ETM_CYC_THRESHOLD_MASK; if (val < drvdata->ccitmin) return -EINVAL; - config->ccctlr = val & ETM_CYC_THRESHOLD_MASK; + config->ccctlr = val; return size; } static DEVICE_ATTR_RW(cyc_threshold); @@ -701,14 +704,16 @@ static ssize_t bb_ctrl_store(struct devi return -EINVAL; if (!drvdata->nr_addr_cmp) return -EINVAL; + /* - * Bit[7:0] selects which address range comparator is used for - * branch broadcast control. + * Bit[8] controls include(1) / exclude(0), bits[0-7] select + * individual range comparators. If include then at least 1 + * range must be selected. */ - if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp) + if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0)) return -EINVAL; - config->bb_ctrl = val; + config->bb_ctrl = val & GENMASK(8, 0); return size; } static DEVICE_ATTR_RW(bb_ctrl); @@ -1341,8 +1346,8 @@ static ssize_t seq_event_store(struct de spin_lock(&drvdata->spinlock); idx = config->seq_idx; - /* RST, bits[7:0] */ - config->seq_ctrl[idx] = val & 0xFF; + /* Seq control has two masks B[15:8] F[7:0] */ + config->seq_ctrl[idx] = val & 0xFFFF; spin_unlock(&drvdata->spinlock); return size; } @@ -1597,7 +1602,7 @@ static ssize_t res_ctrl_store(struct dev if (idx % 2 != 0) /* PAIRINV, bit[21] */ val &= ~BIT(21); - config->res_ctrl[idx] = val; + config->res_ctrl[idx] = val & GENMASK(21, 0); spin_unlock(&drvdata->spinlock); return size; } From patchwork Mon Dec 16 17:47:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181762 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4621731och; Mon, 16 Dec 2019 09:58:03 -0800 (PST) X-Google-Smtp-Source: APXvYqyJlicsFTI0PAg1HnVcoch3qihEsSU30QBXBrzdI3D2uVEQLAwwyzDXZQPtEdpf/kD837Gm X-Received: by 2002:aca:d7c6:: with SMTP id o189mr184820oig.130.1576519082942; Mon, 16 Dec 2019 09:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576519082; cv=none; d=google.com; s=arc-20160816; b=ujojVhXEaCVoYovGoHP9brA2+eTRaujI8XTLpTape77EHT8O0+GRjjHM5vkErAyYDE 6mqPEt/hajOjq6TMW82zWbo19EFJFYGkqKoRF6kc5ZGo/q2eSd25Tin+TdDHdWulwhVS mBiusfLnXoeQ+rRw+E9+6og1YWcy7A0Vf+A0KgNiST8+euDngqPuXMSj7GrQi/s4lkA9 qH1gVesZ4gs2UqRoWtmv1xrL6Bg7JxbumRY/snGcEPDLuv5kSNVCriYCSFpFlrylsWUB dH7YMhNRZHkV6PlZs/VcAZKpXo6dvqxZlBHVGQgZtAF+mQT1k26g74PPzZx1XowCnVFM J+zw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dufytRRUoP2Di8qBDBleYPDEOzfOW07lKAXPqnQyLwA=; b=G5+gJL3UTyrs3UiD0TXfueHrx8FZU4I/BI+uGETDNVJD1ly54lzYrYm7deQN2JijNZ vWSRgF5wPH5EB9lCTio+H4riJzjlQTpX+Sksf7u8yjpHHfZ7/h+mB61t6VtlFn07N1mj wROCX7FAbmiQVpsmuWmCGTGMBt9nGSWYxO5R8DZM8NI5G9Vb6OkfgFTeP9783hI3Y0JJ sd8hXrzYXTdO7m42Ekv0o9mGswmKhd/ttt3zSpNTmKTwfDN7mQ1D5K9fuguINjckyJjD o+aknqtiWeS/8vWVkjrX9udxS+krjv2qpbzjQDExTaosxrAOJR084VlxHigIk1mWgeeY rNFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WHwyUURr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 x207si10274990oif.30.2019.12.16.09.58.02; Mon, 16 Dec 2019 09:58:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WHwyUURr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728565AbfLPR6B (ORCPT + 27 others); Mon, 16 Dec 2019 12:58:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:57368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728549AbfLPR56 (ORCPT ); Mon, 16 Dec 2019 12:57:58 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED18E205ED; Mon, 16 Dec 2019 17:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576519078; bh=2e8/UuLvJLNecZgC8ChFnpt7Ilo18ui9cPMWigdrHKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WHwyUURrJdSHNvH+nij4hUT84zieEIwCVNiS48B5zMh36TXXjIFq928SJ1Qr8CmgA nMl1ySgXR6+8UIPZ0GdGmc2axFVroS5+YzvmNWYp3NwJAGOI0aL1YXU5ex4mSH6uvE Y/x63fUzJ+iBp5RNDc/p+pDxAW1oeSZcJW56+ros= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Herbert Xu Subject: [PATCH 4.14 146/267] crypto: ecdh - fix big endian bug in ECC library Date: Mon, 16 Dec 2019 18:47:52 +0100 Message-Id: <20191216174910.473333138@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel commit f398243e9fd6a3a059c1ea7b380c40628dbf0c61 upstream. The elliptic curve arithmetic library used by the EC-DH KPP implementation assumes big endian byte order, and unconditionally reverses the byte and word order of multi-limb quantities. On big endian systems, the byte reordering is not necessary, while the word ordering needs to be retained. So replace the __swab64() invocation with a call to be64_to_cpu() which should do the right thing for both little and big endian builds. Fixes: 3c4b23901a0c ("crypto: ecdh - Add ECDH software support") Cc: # v4.9+ Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/ecc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -898,10 +898,11 @@ static void ecc_point_mult(struct ecc_po static inline void ecc_swap_digits(const u64 *in, u64 *out, unsigned int ndigits) { + const __be64 *src = (__force __be64 *)in; int i; for (i = 0; i < ndigits; i++) - out[i] = __swab64(in[ndigits - 1 - i]); + out[i] = be64_to_cpu(src[ndigits - 1 - i]); } static int __ecc_is_key_valid(const struct ecc_curve *curve, From patchwork Mon Dec 16 17:48:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181760 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4620538och; Mon, 16 Dec 2019 09:56:57 -0800 (PST) X-Google-Smtp-Source: APXvYqz9X5Pdj6ifLbvDL2gnxXKammfY6x4Xv7stX380/I4pDcFqOcfo7CRTtHiW4enVFUtAPIGT X-Received: by 2002:a05:6830:611:: with SMTP id w17mr33364639oti.191.1576519017074; Mon, 16 Dec 2019 09:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576519017; cv=none; d=google.com; s=arc-20160816; b=zmcgmhKHKQhaq0Eef5ejo5gxEGy7ABws4GLYD47V9af+XrVpx4RdN/he9hCC0AruEe vGaE6bv+k4qWp56HiVfF+sdWVGJFamZT6SmRwFjLwatoepFdaRDsxZdJpXssNV8ZP2lx H8CPWg1RU9WqHM6PSpIti1yUPtCsBL5G0SIFsuF8ypj7VC8AYTT/jXHou3HjwdleDbJs +1dvlnwniQScMWzfDh9y+DNcVlxJmh9ol8aD3QXpKeRKKZpcqmFuLdUdyu0Ir4I1G5XV vUXUT1h+2og+tIBk+EH9zx6MCY+ZvzYF8imClMW6IvgQLTzx/3Eh95eiZCvh9sIs72lR BsKA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E5z9zzXebUYr8dVlUFJA84xoYjSsQU3d8yGESmJwYd0=; b=qunKowfYOvFaA1/M7QH2rfxhHBvaV0kIkxNAUSe5E5SU21PTQksNeuoA+XcOfUuOO1 IpzBXW4DOnUUc8gZcRf4nGDbKnvdR6xsFjzwpviHqdvPgx1kIPoN0qn9EZlmtsgmvXMq uFG0YflCEjPho/a9nwl2NmtTmUTBCSwMyHhA2c6fGIv11l2lzJXrxkcO04c3+hicCtyF Om+PLsaUzT747sUF9YCJKhopF9Em+JYuwkpKEEGNWV5hn2YhCG18a1GEFv2EFgNDBhWl IOrTjfBAGT4saIoC2XUesBolXxhRVZsiya8tqD6pGtE99ILewq43foqhjbga20ECVmxF Zseg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="D5vQIQ8/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 l8si11419785otq.75.2019.12.16.09.56.56; Mon, 16 Dec 2019 09:56:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="D5vQIQ8/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727462AbfLPR4z (ORCPT + 27 others); Mon, 16 Dec 2019 12:56:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:55324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727873AbfLPR4x (ORCPT ); Mon, 16 Dec 2019 12:56:53 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B09C20733; Mon, 16 Dec 2019 17:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576519012; bh=2qsDb3uYXabTjglgCrsX28LgWcVWJRMwmsnRQjxE+5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5vQIQ8/w/QIyNrS3PPwTOwYg6J6oLRbS/P3p/p1T6s8Q2HF5fy7gaE3j1GppwgFt Yy9jdJQX7Nv1tuHDSAhCnKCQO0aJl0kIvWe7bg8T8ZRCLt+oGR4HdtOkZk4YaCQEoM 07yBcHTzM4AwZi89Tr++X+oB6mcG3PEevn21/Vc8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Stanimir Varbanov , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 4.14 160/267] media: venus: remove invalid compat_ioctl32 handler Date: Mon, 16 Dec 2019 18:48:06 +0100 Message-Id: <20191216174911.271324041@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 4adc0423de92cf850d1ef5c0e7cb28fd7a38219e upstream. v4l2_compat_ioctl32() is the function that calls into v4l2_file_operations->compat_ioctl32(), so setting that back to the same function leads to a trivial endless loop, followed by a kernel stack overrun. Remove the incorrect assignment. Cc: stable@vger.kernel.org Fixes: 7472c1c69138 ("[media] media: venus: vdec: add video decoder files") Fixes: aaaa93eda64b ("[media] media: venus: venc: add video encoder files") Signed-off-by: Arnd Bergmann Acked-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/qcom/venus/vdec.c | 3 --- drivers/media/platform/qcom/venus/venc.c | 3 --- 2 files changed, 6 deletions(-) --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1060,9 +1060,6 @@ static const struct v4l2_file_operations .unlocked_ioctl = video_ioctl2, .poll = v4l2_m2m_fop_poll, .mmap = v4l2_m2m_fop_mmap, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = v4l2_compat_ioctl32, -#endif }; static int vdec_probe(struct platform_device *pdev) --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -1166,9 +1166,6 @@ static const struct v4l2_file_operations .unlocked_ioctl = video_ioctl2, .poll = v4l2_m2m_fop_poll, .mmap = v4l2_m2m_fop_mmap, -#ifdef CONFIG_COMPAT - .compat_ioctl32 = v4l2_compat_ioctl32, -#endif }; static int venc_probe(struct platform_device *pdev) From patchwork Mon Dec 16 17:48:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181765 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4622266och; Mon, 16 Dec 2019 09:58:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxdFd2n9Ee+E+hvMVEV7VtigUE2NvRkHCkTXLi8oVGF0aJLHnt7oTJdz11FW8v+5GbFWS8+ X-Received: by 2002:aca:5490:: with SMTP id i138mr155498oib.69.1576519111983; Mon, 16 Dec 2019 09:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576519111; cv=none; d=google.com; s=arc-20160816; b=noz4ZQt53cqlvScfqll9z+XR77YC/N55XLLLjZMsaPpdWsT6ibN2JVxIvnETtKKlNu eCefVJGo2LBUy05zOUAR+qF8u6g3rGXdjo9BSjAx3YLx/FNSgofMS57jdsFEnILuHuzN Aeu9+gHl9AVN8UJhEi/CrCB5wHyGbXL0CRU24YTSyl3ow9vKUHW4f8oxYXLgooLc6aJb R7CuyKsZ3dDFrtt7VOgHOO30iHgI0Mlabz4jBBRA0YJHvS6Q5hJ1mgWeuMlzqFeDyNZI XLU6DSCFsSikFAzcMg71VrREYu1gYT9WZPTCGmi3gLJH6YKmDv0NjsQYIRo4uEzjztQd 51Ww== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LBhZcbYaVxamQWStaVwP5t85jEdYMufEhYMiNvHY7PQ=; b=ljZny05c/B0SmIl3A5yM+Cg68TUHsoAi1KJEs0h/Uez7TFMRXIBmMRg2hkXgaqonqF WaNtY4LIwAcKr16e/V4hWgN61Ch6e0uASt6dgaJN+F7vcM1JwkOvo9BT6B872T58ccsi PqbhfZMrE2eOZssiPZBxsoglY+raW1Lgxh7Wy3e295mzI/Ye+ott2j46cx3xuAjisbfw mTsjAv5aor3glLcjfaipzflrL7G5bN65DmC6A0cy3cGXx4JowP25N4eEfw+zHKwZajjm L+8P1oBUqMIgla6YDPWF0a+c0429Kd11f31gGWBeLdj0Y8ma0KgA/Xh3caIlnXJ8J3jf kf+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CoTP/ghA"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 p6si10637673oig.231.2019.12.16.09.58.31; Mon, 16 Dec 2019 09:58:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CoTP/ghA"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728616AbfLPR6a (ORCPT + 27 others); Mon, 16 Dec 2019 12:58:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:58190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728214AbfLPR6Z (ORCPT ); Mon, 16 Dec 2019 12:58:25 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA55820733; Mon, 16 Dec 2019 17:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576519105; bh=3UrjpHRQoSZmVLtaegrGsjNkfqQ564PJ6o7FAiDIfIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CoTP/ghAWklkXyhmRQF9LoT0IO+yl7GeHY20o/HKkKoxB494OwW5U0lzcDi7C+POV HKeDdbJoxcESfTMTmtCJumEH9XdEx76w3kNMjy29l6xJN6vZvPX8mr/CLtp3Tmd2Zc y5JnyrRRkknrppNN1gjsCxHNz/1WL3bhAdrR5dVs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 4.14 198/267] watchdog: aspeed: Fix clock behaviour for ast2600 Date: Mon, 16 Dec 2019 18:48:44 +0100 Message-Id: <20191216174913.385533960@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joel Stanley [ Upstream commit c04571251b3d842096f1597f5d4badb508be016d ] The ast2600 no longer uses bit 4 in the control register to indicate a 1MHz clock (It now controls whether this watchdog is reset by a SOC reset). This means we do not want to set it. It also does not need to be set for the ast2500, as it is read-only on that SoC. The comment next to the clock rate selection wandered away from where it was set, so put it back next to the register setting it's describing. Fixes: b3528b487448 ("watchdog: aspeed: Add support for AST2600") Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191108032905.22463-1-joel@jms.id.au Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin --- drivers/watchdog/aspeed_wdt.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index cee7334b2a000..f5835cbd5d415 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -204,11 +204,6 @@ static int aspeed_wdt_probe(struct platform_device *pdev) if (IS_ERR(wdt->base)) return PTR_ERR(wdt->base); - /* - * The ast2400 wdt can run at PCLK, or 1MHz. The ast2500 only - * runs at 1MHz. We chose to always run at 1MHz, as there's no - * good reason to have a faster watchdog counter. - */ wdt->wdd.info = &aspeed_wdt_info; wdt->wdd.ops = &aspeed_wdt_ops; wdt->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS; @@ -224,7 +219,16 @@ static int aspeed_wdt_probe(struct platform_device *pdev) return -EINVAL; config = ofdid->data; - wdt->ctrl = WDT_CTRL_1MHZ_CLK; + /* + * On clock rates: + * - ast2400 wdt can run at PCLK, or 1MHz + * - ast2500 only runs at 1MHz, hard coding bit 4 to 1 + * - ast2600 always runs at 1MHz + * + * Set the ast2400 to run at 1MHz as it simplifies the driver. + */ + if (of_device_is_compatible(np, "aspeed,ast2400-wdt")) + wdt->ctrl = WDT_CTRL_1MHZ_CLK; /* * Control reset on a per-device basis to ensure the From patchwork Mon Dec 16 17:49:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 181766 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp4623596och; Mon, 16 Dec 2019 09:59:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwUeZscIVvJP+q3E63z+USoCnxxgIKvGmqO1lTSnvNNfV/lZnZXUiXxxLqOH0hJ3aWrRDne X-Received: by 2002:a54:4f8e:: with SMTP id g14mr205988oiy.8.1576519185941; Mon, 16 Dec 2019 09:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576519185; cv=none; d=google.com; s=arc-20160816; b=bYeQJkfv9rgscNSWF96Yn85ZlbZFl0Z/bxM2VYDyfDjekfFBjHzYQxBEkZh+9ZfrZg qdZYtqRy0u3ooNcTzZwajTMzfNDV8Fp/+RoocCXw6c/3MFCIAYWnDGAxDwLNnCgUhGyn q5NnZH6joGWMCB3jo744UA2komoGxd8lf7L7M+uZy4+r9CnyslNR2QG3zRcQ4T3eFsMH PZTvrKOprhQNdU/cYlGX8ebEw/IiYCuMlvW/nBhVWWWt22dtXTOi9fNzAi7EquHtTf9b GoS26qeN+HNko/GUOrYxFxeiyeRezomaVzD/Hf/IUaFn8vwxUWp5pBA4tpZBrXMtTb82 ZEyA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=amH9+2+fpxCl9fj2YOBKpsqozFaURg+4Cpyt3Uha9B4=; b=tUJ47N92/lKJzLtBZXT1AQhP6g0BwHh7MFuUQfvlwIStYDdGz9T+e9uzhDjnPfCx41 LXBRN+8+lZJEJPnavtolJYGIYFW3bHOnwjCEUewO6d6Y8KKl7SeqVDtzBSXmCajQOxKJ NKal35BKzqD3rWEAZdNS97bRpKhcqTO+fLx2AzfShYPcO5WBmAM8AcKFt6i9ZXj94ZDm tQa3r0bxAYUyePFxpRGkpPmI3LXyuVY8rdUrR75ajrT+jvJHLDYW2+hA/ow7Zqx0Wqmk n4HYWQ2aKokcnYIZH1tnvaSK0duc/poGM32piiLaZ7S5VWC+Cxciucz0tMorzyZ5LpbD C6zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mr2INVhi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 p3si10652444oih.186.2019.12.16.09.59.45; Mon, 16 Dec 2019 09:59:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mr2INVhi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727862AbfLPR7o (ORCPT + 27 others); Mon, 16 Dec 2019 12:59:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:32798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728806AbfLPR7l (ORCPT ); Mon, 16 Dec 2019 12:59:41 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3BD020700; Mon, 16 Dec 2019 17:59:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576519180; bh=F4vKAhEQ4KlxcVKJdkavRAZ3Pz5qXOCTJJxmKXUdaDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mr2INVhi34wZlob0IneQyr1bZIgHntvrdEUAyfbix+rq/737TA6sSe/n3tebFJCnO C/uttmr1Wg7IeTHTOL58ziUGnIW8v3ft2V2MWJsjcXHcs17Yj+wGwOvmOV6m8VVskB XNO97sEaT3G7vbV7xWiEg+hxWegKPmaPUCst59ho= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4.14 226/267] ppdev: fix PPGETTIME/PPSETTIME ioctls Date: Mon, 16 Dec 2019 18:49:12 +0100 Message-Id: <20191216174914.938862823@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174848.701533383@linuxfoundation.org> References: <20191216174848.701533383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 998174042da229e2cf5841f574aba4a743e69650 upstream. Going through the uses of timeval in the user space API, I noticed two bugs in ppdev that were introduced in the y2038 conversion: * The range check was accidentally moved from ppsettime to ppgettime * On sparc64, the microseconds are in the other half of the 64-bit word. Fix both, and mark the fix for stable backports. Cc: stable@vger.kernel.org Fixes: 3b9ab374a1e6 ("ppdev: convert to y2038 safe") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191108203435.112759-8-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/char/ppdev.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -623,20 +623,27 @@ static int pp_do_ioctl(struct file *file if (copy_from_user(time32, argp, sizeof(time32))) return -EFAULT; + if ((time32[0] < 0) || (time32[1] < 0)) + return -EINVAL; + return pp_set_timeout(pp->pdev, time32[0], time32[1]); case PPSETTIME64: if (copy_from_user(time64, argp, sizeof(time64))) return -EFAULT; + if ((time64[0] < 0) || (time64[1] < 0)) + return -EINVAL; + + if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall()) + time64[1] >>= 32; + return pp_set_timeout(pp->pdev, time64[0], time64[1]); case PPGETTIME32: jiffies_to_timespec64(pp->pdev->timeout, &ts); time32[0] = ts.tv_sec; time32[1] = ts.tv_nsec / NSEC_PER_USEC; - if ((time32[0] < 0) || (time32[1] < 0)) - return -EINVAL; if (copy_to_user(argp, time32, sizeof(time32))) return -EFAULT; @@ -647,8 +654,9 @@ static int pp_do_ioctl(struct file *file jiffies_to_timespec64(pp->pdev->timeout, &ts); time64[0] = ts.tv_sec; time64[1] = ts.tv_nsec / NSEC_PER_USEC; - if ((time64[0] < 0) || (time64[1] < 0)) - return -EINVAL; + + if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall()) + time64[1] <<= 32; if (copy_to_user(argp, time64, sizeof(time64))) return -EFAULT;