Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5518603pxb; Wed, 26 Jan 2022 14:00:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1Z4oEki+KBg8h+33ea2n57sfhtuY57Xc5GGl4AgVj1qQS2imV+Pp8R1dqvtgpNh2WbuvQ X-Received: by 2002:a17:907:3e1e:: with SMTP id hp30mr613044ejc.694.1643234422318; Wed, 26 Jan 2022 14:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643234422; cv=none; d=google.com; s=arc-20160816; b=iNBmHFYOqnJvXnPrcZEB0C+9+j8gzgEpETuvJXoRyQULxWW/xjxAwG+yXSFgxbRRSD 3YuT4MG3Ddeb/5g+AzJvxYnPmQZjDGB55fGrGg47viXQzqQuaTdSMb6LvKR0LUC/8c6W 3a6N9djmYKvR8eMmazUnZ4Xq8wp63h/NnOB+JhOx+KDHCU06U845x3US3UuYSisr8534 PVCT8to6bFlVsPwGzFWpVaZ1jrrirbK8k+DGklBesXmRzfdEAqEpyWspTwlWTWZcjc+Z XVjfCIs0lVCDLpPiVx33tHQzSlkLcCA3TmzEZz2CUgfZtSCE3CYQ5plF8tFBqyLikbh4 Q5Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4LpTLyJliuJxLgvINcGGHTCssFGhu4/tQZLGf4U7OIY=; b=maGb1dn0EpU1vlYH2yQ+HUvO6bDvm/0AtKXy2k5p18Gdz0kpV70k10TCdGXUlNOynY KRYkTsreEMXYmRuxyBJ7mpEyFt6tyiqfd3MbH+ba1aqqsp9eZfa3N2CmYTzriyxrI5/8 SJnfhJDzlEkByZI+Cw6C+QVKurqq+npKFuQj7GL80//2Gr85a+PMetE4T+wqvaGlgJ6V qiC0eAhcwgZitCp2U9KEhm+5SbVXQAmfskFBA5G2h7Rgu7HOewlGmYgqzyel3MvXT8ej a3+4RqF5ugSXljM2dvt/hCFT9Rik0893SNwmIJyMlxA8wCctTDD8KDL9QSbJj/zbya0v 28qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BotwPb2J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si318775edd.9.2022.01.26.13.59.57; Wed, 26 Jan 2022 14:00:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BotwPb2J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242886AbiAZPdx (ORCPT + 99 others); Wed, 26 Jan 2022 10:33:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235928AbiAZPdw (ORCPT ); Wed, 26 Jan 2022 10:33:52 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCCD3C06161C for ; Wed, 26 Jan 2022 07:33:51 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id l5so52341944edv.3 for ; Wed, 26 Jan 2022 07:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4LpTLyJliuJxLgvINcGGHTCssFGhu4/tQZLGf4U7OIY=; b=BotwPb2J1pDMG00td4zlmVziK8SurJLBoDP9KCc2/h75hLOacZO5PoEKTPbilUMSmL EZo4B8StUCOfOrx2cOccCZ/aenv0GEAjVA6CfSPY4OPK4yMG4WSveKHKi4T+owCUgjeA 9RbKdsp+oYh+e8z8nBsBTQlp76OEwpTlPvfbF21msZNcxNzG8DEwavhlIINEk3Qm3CxC H40XcVao5UtXv28Iwvw2NTlQ5jkrR7UOqz1Ym2bCbxywPiZrFVvlDwr7u33Pp6KutwP7 8q1J5Ur4v5GTefeJjTezDHYG4uqFw4siH+jWmlZPT67mHi6sEOOufoNIzLzI/YRucR8+ 6kiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4LpTLyJliuJxLgvINcGGHTCssFGhu4/tQZLGf4U7OIY=; b=WF0sURW1/j+X/4YhpsHlmXxhKvXqKz0F05AR6Nj+4Ul+SKu7WerRpCtbeWZt1iG13T rn9X3Zm85xolhJdFtJ3mpg7nyRgguDxN45kQz4ixeCkIFpjOfGo63UtvTGodnHE7u/CL JlQhpdOBsLnJoUfN4n0eY/nLrpQc6GDwJVFsvYWRaUYbbngO/qigWsuE/6aRTLtZ3BGp 4RH5rUPUyAbc/evW1nglUMpXCmMraFNdieXyyF3kcpXMc/fqXwAU0ibNFmTSgMwPIpUP qcakTAdG2qh+H8d5tvXMxdG6oLz4mWDPhzzN0JsOx/6bkau/1pZabSUf4TIDrHV01HRa ymEA== X-Gm-Message-State: AOAM530o/fthz7Z3c6qrEzNQYNXG1rOLl7QdAfOh+i16T7bD4Dsj+P/j USUc+lWcx7v4xQ/tXNvUBM+unVKf1tvRPeM3mQW9pQ== X-Received: by 2002:a50:cc03:: with SMTP id m3mr25234890edi.356.1643211230186; Wed, 26 Jan 2022 07:33:50 -0800 (PST) MIME-Version: 1.0 References: <20220126012203.2979709-1-pmalani@chromium.org> In-Reply-To: From: Guenter Roeck Date: Wed, 26 Jan 2022 07:33:38 -0800 Message-ID: Subject: Re: [PATCH] platform/chrome: cros_ec_typec: Check for EC device To: Prashant Malani Cc: Tzung-Bi Shih , linux-kernel , Alyssa Ross , Benson Leung , Enric Balletbo i Serra , Guenter Roeck , Heikki Krogerus Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 8:05 PM Prashant Malani wrote: > > Hi Tzung-Bi, > > Thanks for your review. > > On Tue, Jan 25, 2022 at 7:46 PM Tzung-Bi Shih wrote: > > > > On Wed, Jan 26, 2022 at 01:22:03AM +0000, Prashant Malani wrote: > > > Fixes: fdc6b21e2444 ("platform/chrome: Add Type C connector class driver") > > > Reported-by: Alyssa Ross > > > Signed-off-by: Prashant Malani > > > > With a minor comment, > > Reviewed-by: Tzung-Bi Shih > > > > > @@ -1076,6 +1076,12 @@ static int cros_typec_probe(struct platform_device *pdev) > > > > > > typec->dev = dev; > > > typec->ec = dev_get_drvdata(pdev->dev.parent); > > > + > > > > I would prefer to remove the blank line to make it look like an integrated block. > > I actually prefer it as it is. typec->dev is not really part of this > "integrated block", and I don't want to add another space there. But on the other side the check is part of the "integrated block". Maybe add an empty line between the two assignments if you want a separation. > In any case, since this is a very minor style nit, I will address it > in case there is another version required due to other comments. > > > > > > + if (!typec->ec) { > > > + dev_err(dev, "couldn't find parent EC device\n"); > > > + return -ENODEV; > > > + } > > > + > > Best, > > -Prashant