Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp846826ybi; Fri, 12 Jul 2019 05:37:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYg2tf+/s6RrvGFu6C2RkgdScY99DmNG8swZmgHLhhr3wYD6Ce7+CungPnUChezrO6lZ+X X-Received: by 2002:a65:610a:: with SMTP id z10mr10660479pgu.178.1562935072303; Fri, 12 Jul 2019 05:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935072; cv=none; d=google.com; s=arc-20160816; b=p/1N+1Uh4i8b+mznKWeq6WwbAbK4dWHTfxX3gQytOz/YOkeo3Wt/4XTU9Rzbp5sDDc s+GdNSZmsOI1dWGQNHtgHyL68LxwlU+/iFbCNr8kCysaWEC1yGcD5FBXiKzRNJ5WvEND GJQpzPZdVCXKpvkP2y6EWqMZhxLOpM/KjezUPgtB7A62t7ZyHAiCQeL1wepk5eIv4MRJ XsJAjsNiBB92rx171H+tbrVe9uVXcCpoVpDs9dHLkSrphd7gGvzIqMP1LI6lSj/krfMe dnzI1Lf2mX2eChi6t+JD+7bgcZU/Uthcy1nuq+PdxK67Oc1bJdRFqJVKfz/TXyIRVCDp Tvtw== 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=oZ8PQTUoCSooMDknLm0NlXKDYjgJoo6nr4oHPE6CJRuRqCPFHDI3vAErbfhbN5D4UA lmncvd3a1lW0l9IRUJP3YFRot0nHdh3w+04TGc8s8opTB63TCcVQltdGRGC+NSEsZTKk jORM8O2z/zYXxNCxXial4GX22e0kx2IbLMXmgQbW8kkCTwLYYSQJu32fzij/mA0z+EcP JlnNrSmfZDTD7M4Qh6gvY42l70ijDBpeX4jdTjaLRQQlxc9R3jC1LH8ZDdFqTU81CBwl cDpM6IiM8WVH13vLu3o2ZV1JO+s7xjSW3yc2VjyrQyNXQCKjy2DKRB0HbxR0RznbnOro mNHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gn9Regqy; 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 33si7599266plv.153.2019.07.12.05.37.37; Fri, 12 Jul 2019 05:37:52 -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=Gn9Regqy; 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 S1729202AbfGLMdY (ORCPT + 99 others); Fri, 12 Jul 2019 08:33:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:52398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728754AbfGLMdT (ORCPT ); Fri, 12 Jul 2019 08:33:19 -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 33B48208E4; Fri, 12 Jul 2019 12:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934798; bh=IgWL7JR/zNeYKbzq/yT6N7TKzUk4cfGySnj9gWoIP/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gn9RegqyFefh2I8lkQeE1hGO/yrBt1N83rDk0DlvFLMNA37JRYVZC0QcetWf6aDku eP/KhGWuBxYdJxc09UxfYYKVZ00FmcdvA/FNRnPDGwqMHpCzif+kmVw6lF0kybz7qQ twEUo8On9e4m2AGaJb+ExBUBajc9zLk72eUWUeWs= 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.2 33/61] drivers/usb/typec/tps6598x.c: fix 4CC cmd write Date: Fri, 12 Jul 2019 14:19:46 +0200 Message-Id: <20190712121622.374762019@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121620.632595223@linuxfoundation.org> References: <20190712121620.632595223@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)