Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2244141lqt; Mon, 22 Apr 2024 05:56:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDYevD+17gZTYzUh2DY/p36A4dReuwZoCPAM9WP3iNjQfrNkNDOxQm/sNS+thHXfkZ6nyh1BZSPVCBUWZTOC9O/wkHrAMmlzhOfZp5Ug== X-Google-Smtp-Source: AGHT+IGeu1GWQFWCuquTuEo6QigcSD+qirVMzbX3qB68Ykly78lgRnPz2fLdi81Vy08GGJQhH9Cj X-Received: by 2002:a05:6808:2394:b0:3c8:2fd9:70f5 with SMTP id bp20-20020a056808239400b003c82fd970f5mr2766429oib.6.1713790611715; Mon, 22 Apr 2024 05:56:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713790611; cv=pass; d=google.com; s=arc-20160816; b=Q3hKUT3y/FP5qSZQa4CSFM3QWbTxHnTOId1gToYITGDhLXpKvqy3PYKloJEZFlDxvG wGrY1dR1QKwB0aK0NFiaH2gM7mfQRzpHmfCBcSENv8Dmyc6WwVNZVv8+vCvbTLenbRbv FWHmblk96ytoQywhTatNXtS44wPof/xKvgG16u6EwfpdHakHqJlSa7itZOf5yblACziM DkGhI0lucZQSw15RljQrpYJB8tK8fzFfSMGVwJVuxfiae0mJvega5eOoqzdTTfQj8kG4 wg1bRLAHpq5BC9D35DPbFLVpXySXBIFFbqwq4spQeFJbwdu4y6wYG9vPWxAF/MCcIJfq wbfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2k/r3dqHaF7PO4r3ZGC4NksYTGPvAJMyx34rvc7RZSs=; fh=Nj0+VNJe3QAqS5heELQhsE/cMy/1nWL3byrg7tBgAbU=; b=MUzD+UDwGKp/W6ZLuDzPta0M5tiUgX+kRGxvnClM1FVGbLXLobM6v0SV4DTdW2rpgv dm85PUvSq872BRZ731JMOTU2ZrQzhKrn3OgTPLajx8QtMorWx/41XcKH8+tWm6b8M4v5 SRKledw9OTaOr68CfcPyglDJIGeHA4qaGaTqexnV2gUqEf39cUAbpBTXxiHlZe8U/0nt D/YA4juO8kwebovoNCGjLNp6OQm+7Wh3wJ9c6hwDmZnrVvMjVUUsytepNra/3mEOw/8U bkRIkhckd/vhKvkiqgdoXZbi2nTdvPece+w0oarb5PrUmPpRCRRI8ULuswffgydtxozz la2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P+OAdNX1; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-153175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id hc22-20020a05622a2a1600b00432c6e9f05asi9413176qtb.530.2024.04.22.05.56.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 05:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P+OAdNX1; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-153175-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153175-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A840A1C21052 for ; Mon, 22 Apr 2024 10:29:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71BB913E889; Mon, 22 Apr 2024 10:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="P+OAdNX1" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C26B13E885; Mon, 22 Apr 2024 10:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713781767; cv=none; b=TTphVgnEUZAQKYzeSS0vgwswLnXb+IbADmqAwx8QbbEdBFhBk8qlIR03mCVgCB6iUsjNVQduFg4G2R60rNS379IwqLIe4BB4KEM3ZYuWDd9QBiaEwAQpU3L/8198Pz6AJZmAY+W4qbS78C5AjFBEI0iVxafRppHF5wmebHQZqGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713781767; c=relaxed/simple; bh=Dsjtwdz42mlbmRF3eRysE4BJ8B9Lqudf+iM1+vpzlYM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nVnxq8AJCAKmtUBXBWNIMKt73KHMxUiuF0Ol5b73crjusrrYW6Vs25Hlx4zCLxct8lwmCoEkIwyBrRpY3d2iJDd2ZSqbVURDf+ZR8Oa1NB8Bo2R/M9KOUAvIK/OVb5SEQjOgySG6JatdAGfhZBaMmI/0R3q08eqpnszcTtBnhyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=P+OAdNX1; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713781766; x=1745317766; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Dsjtwdz42mlbmRF3eRysE4BJ8B9Lqudf+iM1+vpzlYM=; b=P+OAdNX1PopvO7JeKXfAWFWMC/NsKdwxiyg/l8FeU8cCB260mspKNTCy +vTaRgCviAA01LYbm9UGmrM5Doq804FEnUYbgYkdkvf2l2Lb9LE+VWIwR Mz+i0K98ZAbse/l5fQI2gDzIH3c2WH9IFZZc8biTuQ9jdKojGdGK/kVH0 1D0Nyskbn9aiOfjR9QSCeXb86JNpXjJIgscUSYNijxZ/nNDJCjlYzzp5Y WH5XambXQVmzewGGb13Ywp7fXZESD+JFAfP8nPbHqVf1F4NEsI9ynU6b+ dpHuYsq20wlBdlXn/a2090ULxqFRrxduLRRwI7b8DAUzZ3y90Iosh2tvM A==; X-CSE-ConnectionGUID: 8gevncY7RBeDLE8KLnxBQQ== X-CSE-MsgGUID: diKzmvJcQ++nrmbdwkP0mg== X-IronPort-AV: E=McAfee;i="6600,9927,11051"; a="20714679" X-IronPort-AV: E=Sophos;i="6.07,220,1708416000"; d="scan'208";a="20714679" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2024 03:29:25 -0700 X-CSE-ConnectionGUID: SOyw/RQuRHa4hy0zb1qhDg== X-CSE-MsgGUID: xVR5rgHDQOuV5zhV0fTmpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,220,1708416000"; d="scan'208";a="24024565" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmviesa006.fm.intel.com with SMTP; 22 Apr 2024 03:29:22 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 22 Apr 2024 13:29:21 +0300 Date: Mon, 22 Apr 2024 13:29:21 +0300 From: Heikki Krogerus To: Dmitry Baryshkov Cc: Greg Kroah-Hartman , Neil Armstrong , Bjorn Andersson , Konrad Dybcio , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 4/8] usb: typec: ucsi: glink: use le32 for message data Message-ID: References: <20240416-ucsi-glink-altmode-v1-0-890db00877ac@linaro.org> <20240416-ucsi-glink-altmode-v1-4-890db00877ac@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240416-ucsi-glink-altmode-v1-4-890db00877ac@linaro.org> On Tue, Apr 16, 2024 at 05:20:53AM +0300, Dmitry Baryshkov wrote: > The message structures as transferred by the PMIC_GLINK use le32 for > data encoding. Correct struct accessors to follow the lead of the main > pmic_glink.c driver. > > Fixes: 62b5412b1f4a ("usb: typec: ucsi: add PMIC Glink UCSI driver") > Signed-off-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/ucsi/ucsi_glink.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c > index 6be9d89d4a28..d029cc9d82e3 100644 > --- a/drivers/usb/typec/ucsi/ucsi_glink.c > +++ b/drivers/usb/typec/ucsi/ucsi_glink.c > @@ -33,7 +33,7 @@ struct ucsi_read_buf_req_msg { > struct ucsi_read_buf_resp_msg { > struct pmic_glink_hdr hdr; > u8 buf[UCSI_BUF_SIZE]; > - u32 ret_code; > + __le32 ret_code; > }; > > struct ucsi_write_buf_req_msg { > @@ -44,13 +44,13 @@ struct ucsi_write_buf_req_msg { > > struct ucsi_write_buf_resp_msg { > struct pmic_glink_hdr hdr; > - u32 ret_code; > + __le32 ret_code; > }; > > struct ucsi_notify_ind_msg { > struct pmic_glink_hdr hdr; > - u32 notification; > - u32 receiver; > + __le32 notification; > + __le32 receiver; > u32 reserved; > }; > > @@ -255,7 +255,7 @@ static void pmic_glink_ucsi_write_ack(struct pmic_glink_ucsi *ucsi, const void * > if (resp->ret_code) > return; > > - ucsi->sync_val = resp->ret_code; > + ucsi->sync_val = le32_to_cpu(resp->ret_code); > complete(&ucsi->write_ack); > } > > > -- > 2.39.2 -- heikki