Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2518135rwb; Mon, 3 Oct 2022 01:48:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6I5EWIkKNzKNGbKPICta/X3U/BAzAJlNQaTyF1g3HgLcR9nInJrLvF0PRTCR9fpdH8OooF X-Received: by 2002:a17:90b:4397:b0:20a:bb3d:bb82 with SMTP id in23-20020a17090b439700b0020abb3dbb82mr761460pjb.194.1664786894052; Mon, 03 Oct 2022 01:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664786894; cv=none; d=google.com; s=arc-20160816; b=hgFh9U9PZvpgnxkFWInhq2WXpUIGhjaNZ2E48SWKNij3DQqHzfSMuu0acXeRJwdebz IMlTN3OYe+OvKq1x4r0EbaxrYmNEfvfF03EX7pujbgIr6qSU4QZ1o2URFSK5Op0q7qQW TradrhEoYBFeSQ0nts2Vibv4v60cz9JT1t8PI56irHMKzRfcFCm9F3r6QRTsvfA89jw3 bEfHzYIbTSRBBsjamob0IupgEF6hkIPGjR/YwT7rjhZ3IyNH+xPeMeoLRuM1Nwd0ZkZG i4g/hwxNkki6M2C8hQJ6IssxAtZuGaPE96SUeaxvctEMueFHJuIAnROYIQN/0O2iHPrq fvxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5lUKvisQtGtU9b2piyqm4BNIeedER4Z8tC3ea8WItOw=; b=xXIe8spW7b36xBbkXAmdfqdLzvtRgXGGbb/+XkpvMyYUYkA28At7RdpGzt405jGZlK TA2mykoLcNg+8cpNoZyPd4ma6X24jopIUIqQ/EhTU/bVXCVN15rAD7hdtHVZcZ7xmWh8 BPAegXuVeiAuStBM1BLsfw1Rb9VyiPxLWYoiNLGmM/ID8xrOCKjr0oCKkds+zkRndQNi L9sV/a4qUgoRJMA/quImpRxOw72WPztRHv7kokDanHIEP45k8Nb62M0GoiMHWQUKNskI q2wwNPvvpRd52T0nK/WWvS2SbUi/WgPWHl/mtH2qDtELq3VT7Vi5kg+BpxODaoRtEZDZ Y9sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f4QsKxzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c23-20020a631c17000000b0044934f3dabbsi5971001pgc.233.2022.10.03.01.48.02; Mon, 03 Oct 2022 01:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f4QsKxzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231424AbiJCHdC (ORCPT + 99 others); Mon, 3 Oct 2022 03:33:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231439AbiJCHcX (ORCPT ); Mon, 3 Oct 2022 03:32:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 264504F393; Mon, 3 Oct 2022 00:20:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8E5F760F97; Mon, 3 Oct 2022 07:20:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1A99C433C1; Mon, 3 Oct 2022 07:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781642; bh=sYll7ZP2PDZtg5d9aDoiVEZ7UY8f0WBXmTE27CYtDp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f4QsKxzVElckoNeS5C2Zy34V014xB9UZpjWaUEv/NCeXyXV67WoRFiOYtDlEk8Top cnNDCREZW5Gz6WiYiTqNT4OpCH96pE/5hA8EN06Ywh5AZdMK36ZI6aN3jce5XaroHM 2ZMV3eCdmmQcSj+sgxHceGnpzhYAVzC3S3Qbd/QE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Menzel , Heikki Krogerus Subject: [PATCH 5.10 11/52] usb: typec: ucsi: Remove incorrect warning Date: Mon, 3 Oct 2022 09:11:18 +0200 Message-Id: <20221003070719.060771871@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070718.687440096@linuxfoundation.org> References: <20221003070718.687440096@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heikki Krogerus commit 415ba26cb73f7d22a892043301b91b57ae54db02 upstream. Sink only devices do not have any source capabilities, so the driver should not warn about that. Also DRP (Dual Role Power) capable devices, such as USB Type-C docking stations, do not return any source capabilities unless they are plugged to a power supply themselves. Fixes: 1f4642b72be7 ("usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4") Reported-by: Paul Menzel Cc: Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220922145924.80667-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/ucsi/ucsi.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -515,8 +515,6 @@ static int ucsi_get_pdos(struct ucsi_con num_pdos * sizeof(u32)); if (ret < 0) dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret); - if (ret == 0 && offset == 0) - dev_warn(ucsi->dev, "UCSI_GET_PDOS returned 0 bytes\n"); return ret; }