From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B993C0650E for ; Wed, 3 Jul 2019 16:47:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D593E218A4 for ; Wed, 3 Jul 2019 16:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562172442; bh=zxW/xT283w3ydr4QsUb5WCMMY9F59v83vgxRLcl0EVc=; h=Subject:To:From:Date:List-ID:From; b=2dHU1CHe78SqVLAjU64Wk1oj9BAsghtErhuap7ldcK+DuHl6iJRK8OEMmok6jRUM6 cH++DLRU5rfHzX+GVL8DG/3l2lglyb7oP+vVMEoOaRDgia8nFPmeVi+oolqLvf5ETC IJQCvk/79R7xKrzxUh8vO1l1PTxfhAPVl+q+3kMc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfGCQrW (ORCPT ); Wed, 3 Jul 2019 12:47:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:51440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbfGCQrW (ORCPT ); Wed, 3 Jul 2019 12:47:22 -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 CE5DE2189E; Wed, 3 Jul 2019 16:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562172441; bh=zxW/xT283w3ydr4QsUb5WCMMY9F59v83vgxRLcl0EVc=; h=Subject:To:From:Date:From; b=CgNiDFbYO4GF1hStWkIXtJzLRn/qiz1iMjKt0OOJEcXTArwWa3dIn7fWJl5VR5h4J lMxgQuDn5KeH5fj2x853A5NNLQNru9yljAI+U1gZCa2Bvbb/sNZChJKTpKTXv9TKY7 Ja4azVnce9dqlRlJoOqWR0CnFfgUImRRuUh3OEhs= Subject: patch "drivers/usb/typec/tps6598x.c: fix 4CC cmd write" added to usb-testing To: nikolaus.voss@loewensteinmedical.de, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, stable@vger.kernel.org From: Date: Wed, 03 Jul 2019 18:47:06 +0200 Message-ID: <156217242621810@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled drivers/usb/typec/tps6598x.c: fix 4CC cmd write to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-testing branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will be merged to the usb-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. >From 2681795b5e7a5bf336537661010072f4c22cea31 Mon Sep 17 00:00:00 2001 From: Nikolaus Voss Date: Fri, 28 Jun 2019 11:01:09 +0200 Subject: drivers/usb/typec/tps6598x.c: fix 4CC cmd write 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(-) 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.22.0