Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp851625ybi; Fri, 12 Jul 2019 05:42:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyYpHQGkVDX3CpPw9hTDvjC545bjvzjv4W+hZERe5qHSO7xKgR/Zt81yXKIpzrGFDpKL3A X-Received: by 2002:a63:da52:: with SMTP id l18mr10719802pgj.131.1562935367937; Fri, 12 Jul 2019 05:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935367; cv=none; d=google.com; s=arc-20160816; b=uM9n3S5YLX1e5T7Dta7sO9nsHXjJfSqwdaSmybd9cHQxPYuQ9aqa6oMqKJxGfUjadM ZurVkWGdj+/eIpO5zwOGDM49tWzd7QEUMz3OSF+vHsQo/wmAkLbxm39zzXQ/pA5DrV0p RZHHUY1aZZAXEo1lXGyb6bFYvNSBrzPdEloR6fjpSV6F+3AZUn16VC5DMJI1nE9bEHUX Pa1dkUt7MD42hUulwFT87z4hktit7E/WtZ/OCCrJkq2IyqmgrXqbSqBqnyGIV1xPB8H0 1RaQ4gPIaIwYp1UiekkZzftObreKUxkGyPjVMqRZ0SBe9njm4R+laKyhXwhaNo15L3BE UDDQ== 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=p83EULbR6hGRtct6ZC3ELFMIiTnZmJHHFe/9LadzFzE=; b=YhwHKBfy/9tCFNgKXvNWO0+hkyinYWWIUl/nc62R9mhVzQ5aJuAJp1+N9yI13na39j Z7SaBrUu92tr0owqHLesidB6tgzNeUSva/vdlSduRyRAJqkKbWtbEYQiRc+aM+MkLWll UZ4X006ZBwlirsiz//a3ktJ9KThjW1jBrP3YS3qjsQ2z2qd25K9gKBor2IctoP7dXoKZ gzKH+h3RP0zlq2RmSokGlcCl4zA+8bX6PGmROuLw0eZoJsygrhX4Ixg1WZ0XcUo2jFlq gonPdIhbw9eA1mGRmVK1XQ5Bp+8BqtXIBAjr4Qw6M0R53Ojdcb1XItGNlG6Y5lr+8iZr SUew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=06pQny0v; 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 n6si7521377pgp.424.2019.07.12.05.42.32; Fri, 12 Jul 2019 05:42:47 -0700 (PDT) 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=06pQny0v; 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 S1728010AbfGLMX7 (ORCPT + 99 others); Fri, 12 Jul 2019 08:23:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:59860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727990AbfGLMXt (ORCPT ); Fri, 12 Jul 2019 08:23:49 -0400 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 BFACB2166E; Fri, 12 Jul 2019 12:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934228; bh=0ahWQ9AhpV31pXGOghdJciw1LpUI/KQKn1do30aGqjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=06pQny0vAIA2MOnvj+6lOApGvWyIca7DF2Fhs5n9gjJCK8TKK8WVPSLD4T0PB0Uso SovtxYRDXS5l9H+ReqCIC3/mo3g8kwFU7G/LFhR3MQ7N487QmXPYIdTa6R6KZV6C9T MINeb4VE4epiuxkmbwoDyCBem/KAAQkePujRXB10= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolaus Voss , Heikki Krogerus Subject: [PATCH 4.19 77/91] drivers/usb/typec/tps6598x.c: fix 4CC cmd write Date: Fri, 12 Jul 2019 14:19:20 +0200 Message-Id: <20190712121625.937102695@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikolaus Voss commit 2681795b5e7a5bf336537661010072f4c22cea31 upstream. Writing 4CC commands with tps6598x_write_4cc() already has a pointer arg, don't reference it when using as arg to tps6598x_block_write(). Correcting this enforces the constness of the pointer to propagate to tps6598x_block_write(), so add the const qualifier there to avoid the warning. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Signed-off-by: Nikolaus Voss Acked-by: Heikki Krogerus Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/tps6598x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/typec/tps6598x.c +++ b/drivers/usb/typec/tps6598x.c @@ -111,7 +111,7 @@ tps6598x_block_read(struct tps6598x *tps } static int tps6598x_block_write(struct tps6598x *tps, u8 reg, - void *val, size_t len) + const void *val, size_t len) { u8 data[TPS_MAX_LEN + 1]; @@ -157,7 +157,7 @@ static inline int tps6598x_write64(struc static inline int tps6598x_write_4cc(struct tps6598x *tps, u8 reg, const char *val) { - return tps6598x_block_write(tps, reg, &val, sizeof(u32)); + return tps6598x_block_write(tps, reg, val, 4); } static int tps6598x_read_partner_identity(struct tps6598x *tps)