Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2572719ybc; Wed, 13 Nov 2019 17:08:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyfasokbZ70PeitixCoIFMPBJUmT6u4mwgUA/ge/O0gby+YviraS5Yf8FmVZhffg5gTJia+ X-Received: by 2002:a17:906:2584:: with SMTP id m4mr6012195ejb.287.1573693738118; Wed, 13 Nov 2019 17:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573693738; cv=none; d=google.com; s=arc-20160816; b=gaokINiudHsfHsp6g6Bf20iMIG5vcSTcrEtTuk6gs2CgPPi0QK1ExK0f4kcMHvXVR5 hnYUZHMAH761CgG3/Y6DS/bIHtzSwZ+U/QhkURmoLNgg0hrmXnTZFdf/cc/fctAKNYbH 5Pf115v27Br6OZsOL+VOxgVeD0oL2ZmtyvW049lfn6EnbHv5295ahTiofdfDW3YcWvcR F+WGMqvREs77drkVAMEOKVCebIlfoJC/t2kPjwZTDqMF0Xt5FV10omcLUC5T/BPRPWeC QI4gRjcGNEG0QiRriVvYB0q2/8UbnK4D4v8Jmo8NIC+XvhOzngBAULtRIBh8zmFUFcHX 6+4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ydnaeANHQEhicw8ps/5ADrrzqJDVC8ehSIKm3ZEsYec=; b=05raM/XWOjWuSxLxpinR3SQEcab7xxt5QNq/EcMJdidqfmsJuM9+98ET5CGHE+WNMH oBV0RGrOvb94orEKcx0o+QuOulWAAT6rEtIMNZV0ch674W9tkUMeCIWkISpD4i+Mrdby re8W/R/ioLZjqpUmZW8WqSD7SFg6EllOl6E/CrLslly/lgaMns9Bic0IZhrY7q80OnhS JYA+ViNy70JAiJGUS3qIpwCqEzqc5qe4nxEW1h2Jd8HinHC0RQGpkCCdfPLlLx8WcKDV TYpSxXDrYw5+z3Z/Tk1ceitekN7d+IC/rzB9SJJaqEM2oFTH0KEiUzV7tBvck0A6I2i3 ROOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HKCk8MF6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si2974482eda.262.2019.11.13.17.08.33; Wed, 13 Nov 2019 17:08:58 -0800 (PST) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=HKCk8MF6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbfKNBIA (ORCPT + 99 others); Wed, 13 Nov 2019 20:08:00 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:32793 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbfKNBIA (ORCPT ); Wed, 13 Nov 2019 20:08:00 -0500 Received: by mail-yw1-f65.google.com with SMTP id q140so1332641ywg.0 for ; Wed, 13 Nov 2019 17:07:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ydnaeANHQEhicw8ps/5ADrrzqJDVC8ehSIKm3ZEsYec=; b=HKCk8MF62E0LPOPcdetRcNdW6RmmuPalngquz1nXz5j4SDf+aD5YdFAa93vQnYM3DA 9Nt8QP1etU9tQQ549wGvpEKT8j1GdazwVbVkk/wV4AXewlsAadX5pzB9IXjcNWrRQlSA IrZlP9lzEQrnH896VQfy0x+0KBvdGY5azLmRlnW2CNxeMCfGSBbIKFmMAILtsX1WjkiN Fd0IUdJeNDxOBne86+cxeprIaOssd7/U20EOMIxVGA7ubkRdznfWba+/zeK8KqbsZrsj zWBprnQkJ3nKQ9AVGedKVu7BXmZ9CkwFoChVwCXMAjuL6klbpBjhqL5uj4Y3sWO7dTnW /dsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ydnaeANHQEhicw8ps/5ADrrzqJDVC8ehSIKm3ZEsYec=; b=KlW/O4q4e6+tD5koq+JbCqTXaDwWwlDrOKBbMiL8tCc68ttJBk1/XiuvplOTNxt3MV 5wSjFr8weEVueCQ/FbJJp+InuUq5v3tJS9wOoskVTHhdsRj5oeCfU2WEwwZ30s/+blKt k1/+KIZ05NwAuYZAwkHzG1jjASbvG9NyKDGcjrsqmBRty9CiQLNNM6xDi/WoI6hSlr1J M0qVyiIfY+4r/ToBYntpa75rYBcRFZi+rg4b85yfnY7unGy1Csd8Hx/RT4Uu72vPy+zN UHYWc/Azfcyhfi1Hz7ceuWwAdBTBrStmZ1sZ0iT+i82zfdXuMOsuD1hmZPpy3xmgVatT TwUA== X-Gm-Message-State: APjAAAUEbYUsje5MjqW3FzDIfReyVzR/xtWTvm6NRevfISCbT9U2y7bu iI/4DN2rJZ64TiHS2FeEDcwoxEMI84me5tKqJpmmGQ== X-Received: by 2002:a0d:e891:: with SMTP id r139mr4379793ywe.232.1573693678724; Wed, 13 Nov 2019 17:07:58 -0800 (PST) MIME-Version: 1.0 References: <20191113031044.136232-4-jflat@chromium.org> <201911132033.3UoCbltt%lkp@intel.com> In-Reply-To: From: Guenter Roeck Date: Wed, 13 Nov 2019 17:07:47 -0800 Message-ID: Subject: Re: [PATCH 3/3] platform: chrome: Added cros-ec-typec driver To: Jon Flatley Cc: kbuild test robot , kbuild-all@lists.01.org, Linux Kernel Mailing List , Benson Leung , Guenter Roeck , Sebastian Reichel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 13, 2019 at 9:23 AM Jon Flatley wrote: > > On Wed, Nov 13, 2019 at 4:55 AM kbuild test robot wrote: > > > > Hi Jon, > > > > Thank you for the patch! Perhaps something to improve: > > > > [auto build test WARNING on ljones-mfd/for-mfd-next] > > [cannot apply to v5.4-rc7 next-20191113] > > [if your patch is applied to the wrong git tree, please drop us a note to help > > improve the system. BTW, we also suggest to use '--base' option to specify the > > base tree in git format-patch, please see https://stackoverflow.com/a/37406982] > > > > url: https://github.com/0day-ci/linux/commits/Jon-Flatley/ChromeOS-EC-USB-C-Connector-Class/20191113-193504 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next > > > > If you fix the issue, kindly add following tag > > Reported-by: kbuild test robot > > > > > > coccinelle warnings: (new ones prefixed by >>) > > > > >> drivers/platform/chrome/cros_ec_typec.c:223:9-16: ERROR: PTR_ERR applied after initialization to constant on line 222 > > > > vim +223 drivers/platform/chrome/cros_ec_typec.c > > > > 206 > > 207 static int cros_typec_add_partner(struct typec_data *typec, int port_num, > > 208 bool pd_enabled) > > 209 { > > 210 struct port_data *port; > > 211 struct typec_partner_desc p_desc; > > 212 int ret; > > 213 > > 214 port = typec->ports[port_num]; > > 215 p_desc.usb_pd = pd_enabled; > > 216 p_desc.identity = &port->p_identity; > > 217 > > 218 port->partner = typec_register_partner(port->port, &p_desc); > > 219 if (IS_ERR_OR_NULL(port->partner)) { > > 220 dev_err(typec->dev, "Port %d partner register failed\n", > > 221 port_num); > > > 222 port->partner = NULL; > > > 223 return PTR_ERR(port->partner); > > 224 } > > 225 > > 226 ret = cros_typec_query_pd_info(typec, port_num); > > 227 if (ret < 0) { > > 228 dev_err(typec->dev, "Port %d PD query failed\n", port_num); > > 229 typec_unregister_partner(port->partner); > > 230 port->partner = NULL; > > 231 return ret; > > 232 } > > 233 > > 234 ret = typec_partner_set_identity(port->partner); > > 235 return ret; > > 236 } > > 237 > > > > --- > > 0-DAY kernel test infrastructure Open Source Technology Center > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation > > This patch is based off of the chrome-platform for-next branch. > > base: https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git > for-next > > Is this incorrect? I'm happy to rebase if necessary. > You are missing the problem. port->partner = NULL; return PTR_ERR(port->partner); Does not make sense, and always returns 0 (no error). Guenter > Thanks, > -Jon