Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3106426ybd; Fri, 28 Jun 2019 03:01:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzs71845t/4wCLfiCKMz5EZN/5jhqneom7WsPiFbXOQrFM0eOw0xSTbPZ1+JLhyo81gTloj X-Received: by 2002:a17:90a:9a83:: with SMTP id e3mr11825092pjp.105.1561716070162; Fri, 28 Jun 2019 03:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561716070; cv=none; d=google.com; s=arc-20160816; b=IuQObARSnW7ICDEyllkeqJk76xwj7vkTB9EzkQHEb3LB0PwxUkFiPPpNy9TZR71CDy WYngC8v8AdDUSe+8HUYmkA8Rcv76s51FnlmZTwoEXMR5G68zpMWeRBsMvyHsES153NcU TGfAE+lcThOE6mz+yd+XzfSVsywwQa9m3xCXXt2nQypTTAgJcIFg5duHzPcM2H8TwdCC O4xlHUeyseAbOjMWkUYgBahCG5Z+G+APeqqRNnZT1IlMaXadZ7vl1KcKq82pwWnJHoAj umRuxE23+j9MUjxwkulcosDY2ySOYfJuSX/OUyM6KLCfB+jWN3cfzUTSh5cpJhDKr/D2 +Vdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DnA7HoyD5dirTp+bKTaYvzjLFuSrHT7puMh/L7a6fPA=; b=Ah5Q7gvWkm5V1MpW70i0N8aM4cX9z7n8Ksv5++ISLoBB6I1vzi9WmrdDgI4LzA05sl PPPTQWoffZf/ZR9FSk6Qh3OhMAmlwSxHJWlsPmUmbcHYyOtMpLo5daQavuHCPZXaHGzW IGqAs9AOnEdx82Ewr60FAx076bww0yMuqmjB6RGpsLipOtfEJ5Yw2RneHQW2sqCZV8uC hHtTXGD5/tNSlFEx0XbjZuaxrG1rP4yVUBOzXAVzHiHxgRLZLMFvEX/U6mqu66xAcUCp Gtw1MR6OoETKr7GeSSBWoDO24Y7JIzPDjUSJu1D57sjoMU+Fv0N/Jn9G/+knB7ErE6Sw a1Mw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si1670878plm.94.2019.06.28.03.00.53; Fri, 28 Jun 2019 03:01:10 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbfF1J7q (ORCPT + 99 others); Fri, 28 Jun 2019 05:59:46 -0400 Received: from mga06.intel.com ([134.134.136.31]:63037 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbfF1J7q (ORCPT ); Fri, 28 Jun 2019 05:59:46 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2019 02:59:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,427,1557212400"; d="scan'208";a="183657476" Received: from kuha.fi.intel.com ([10.237.72.189]) by fmsmga001.fm.intel.com with SMTP; 28 Jun 2019 02:59:43 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 28 Jun 2019 12:59:42 +0300 Date: Fri, 28 Jun 2019 12:59:42 +0300 From: Heikki Krogerus To: Nikolaus Voss Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, nv@vosn.de Subject: Re: [PATCH 2/2] drivers/usb/typec/tps6598x.c: fix 4CC cmd write Message-ID: <20190628095942.GC21701@kuha.fi.intel.com> References: <20190628083417.GA21701@kuha.fi.intel.com> <47a0d3b0b725c58bf7f422261a7c5d3accafea57.1561712364.git.nikolaus.voss@loewensteinmedical.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47a0d3b0b725c58bf7f422261a7c5d3accafea57.1561712364.git.nikolaus.voss@loewensteinmedical.de> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 11:01:09AM +0200, Nikolaus Voss wrote: > 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 > --- > drivers/usb/typec/tps6598x.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c > index a170c49c2542..a38d1409f15b 100644 > --- a/drivers/usb/typec/tps6598x.c > +++ b/drivers/usb/typec/tps6598x.c > @@ -127,7 +127,7 @@ tps6598x_block_read(struct tps6598x *tps, u8 reg, void *val, size_t len) > } > > 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(struct tps6598x *tps, u8 reg, u64 val) > 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) > -- > 2.17.1 thanks, -- heikki