Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp841589ybi; Fri, 12 Jul 2019 05:32:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwv8IEblvrIhf/vIulD8g3gngKRG6GglBoSqNm57Z1A0+vff+rWDgyEnbVFGZd/U6chSyTU X-Received: by 2002:a17:90a:d80b:: with SMTP id a11mr10975716pjv.53.1562934776153; Fri, 12 Jul 2019 05:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934776; cv=none; d=google.com; s=arc-20160816; b=KnDUc0qidcRWKq4fG2TNUp3oA74+9jq2NhZhVxe91xMIfTEZhhTkUyhUQGYt1Nr6WR sgJHQdvc2mTk2UL7bt1nPD9WwgqlHToa3NFpYYlsmJnHGyzhCjVsbxmpnMVN5RshH/jJ bZhrqLhkz4CLn5Ck9BbK7jX3x2OTgtk8QK87wya1fmwE5yiNsCyFOUnLKgoBfdVTbbXB z5k+fQzwDS2cYLk5vIXA8ViIq+gY6grcdeZi5/w7A4JpM/us7Ux/S/tbBSX+jXivFeC8 /xQUQM/0mF4XuK6C9pZVt4w97kYtLWyqsIySa0bp1lFD/0mnzyMHWTd73oF8ZZSW+fg/ gEfQ== 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=rWsxhZROj7hplC3mU/XpY8Tz8ByDOCj3Jrsdo8xgc7E=; b=D56EMqlYZUB070Hoqmg5VMasX/B26f+5nFy7oicKMDU/8xBk54XFDbkuPNqtJqXlrr mt3tfGlYFKtLoeVnaff461S7FGl2WLlRwqo8Oz9mtyhRBaK3KBrL1NTJyQg6rVV75nKo xEDeSNVz4/c/bMUKKcBbpb0L2Kk9oyoEwaYQKxe/GRsDNkdVf/cvwj6yEVvRJbR8Paoo gpIT2zgg/UvZbekFYUBBvwW0Fjt+bbULUpdnUZNyIVYXOBbEBYgePmB5LYPi7VZiMDFG HxrVmDP3a7By20jqqPx1CS+UvT+v2oJZsa2UO/dJwxF2z16rghzOI4z6S6jeE8tr1ynk mLKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yrCsrw4c; 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 e2si8144267pfn.32.2019.07.12.05.32.41; Fri, 12 Jul 2019 05:32:56 -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=yrCsrw4c; 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 S1729169AbfGLMag (ORCPT + 99 others); Fri, 12 Jul 2019 08:30:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:46464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728246AbfGLMad (ORCPT ); Fri, 12 Jul 2019 08:30:33 -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 5DD69208E4; Fri, 12 Jul 2019 12:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934632; bh=IgWL7JR/zNeYKbzq/yT6N7TKzUk4cfGySnj9gWoIP/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yrCsrw4cXw1uhqFDG8yxVuKOJlU+egyrVxvt1C9v+tsPYVLt7xiVdJyD+72XnpjZK Dfh8632yWsJfTHTmwzBUXS6llZNBdHi6JIJxDmqd5NeVkmmmJElteB0+R+ACJaQqnd p7ms73fHZsQXeQ4xnuJdoHg2PdqfHAgc9jXBHPlQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolaus Voss , Heikki Krogerus Subject: [PATCH 5.1 117/138] drivers/usb/typec/tps6598x.c: fix 4CC cmd write Date: Fri, 12 Jul 2019 14:19:41 +0200 Message-Id: <20190712121633.238154218@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@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 @@ -127,7 +127,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]; @@ -173,7 +173,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)