Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3054568ybd; Fri, 28 Jun 2019 02:01:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLhYhXVN2TYigkY9lSe0i/zpgTHzQnpUiENPXMQ3VYkHh6IExuRAl5gp9zKU7y9HJ5XV9S X-Received: by 2002:a17:902:a5c7:: with SMTP id t7mr6328254plq.288.1561712508582; Fri, 28 Jun 2019 02:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561712508; cv=none; d=google.com; s=arc-20160816; b=uCEccjeMdP1Lx9m59U2r/kllZ4+HaVHGcYbprZzpBqqj0cvDQgYw29i8gLNdg0XALl XuaUWKwycoJ1td7bBwUV7HjlNJB6FlwwpO+A1Bom2NwNfjft7+R99UZvNyHx+V7H80Bx B9Cipjyo5WlC4SmhcYTfr5lPAWWYgDIhCOzrKN1NsV9UWV4yLvC31CcGDD4Oxa43vra2 /Gjgw7bg/hn8RzIy1b7xMEPYmPyG6dctjgCt5jb6M0a6qj73UegMS8OzrVtBRWRbcN0+ wQXWAbTJeEefFDI5Rkllj/egNiLWqzizeNuhNdJpek1skMmzcroWnFIilPYOOaKIdGlv weNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=ewBKJKD/EzalQkyTkEA2toP7bptWAAQHULxe1+XvBts=; b=D5YWdkN/8wd5M2XrKPSQmEIIzXsc4ndfgIOtFbjsDYrv3IwQk366UHu30KGF+jLfp4 /9l0DI7vCK5zKVZI/BA/bRVZAL8hHRPbQwBe3SbhlE1BoksgfuNqKnTrogvdwrFE6wlb aO7FZyWPTmy/PjQqJ5Z8myMti6tgCrGfjMYDrcx5Mh7Ma0wpylo6/2ChuOcQk/afvtHn TgZY/1U8E3eJxZ2Ytm/1Kqg55IFyML+H4m0aNduwGHxAIlxzzILkUhd/ab/MVJWrl+wZ /dR/qeV7NkYzxZj/u8alx5Ct9KGWrSOxGLbvryI78pJQfhblRI298RDTwEhrOWCQx4/N ZkgA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si1564133pgl.203.2019.06.28.02.01.31; Fri, 28 Jun 2019 02:01:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726666AbfF1JBY (ORCPT + 99 others); Fri, 28 Jun 2019 05:01:24 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:40966 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfF1JBX (ORCPT ); Fri, 28 Jun 2019 05:01:23 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from pc-niv.weinmann.com (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id 8D42A4BAAC; Fri, 28 Jun 2019 11:01:21 +0200 (CEST) From: Nikolaus Voss To: Heikki Krogerus , Greg Kroah-Hartman Cc: Nikolaus Voss , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, nv@vosn.de Subject: [PATCH 2/2] drivers/usb/typec/tps6598x.c: fix 4CC cmd write Date: Fri, 28 Jun 2019 11:01:09 +0200 Message-Id: <47a0d3b0b725c58bf7f422261a7c5d3accafea57.1561712364.git.nikolaus.voss@loewensteinmedical.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: <20190628083417.GA21701@kuha.fi.intel.com> References: <20190628083417.GA21701@kuha.fi.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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