Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp47329pxu; Tue, 1 Dec 2020 05:56:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVWn6pAeFZfSnVE10B/Oedv4rBjEtiL0tUXJ8eDB3SqPV73S8r4GYOfs1Tz/hRnQvmeYt8 X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr3221933edr.235.1606830976118; Tue, 01 Dec 2020 05:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606830976; cv=none; d=google.com; s=arc-20160816; b=llYh+CYSZyESB1WSj1LJQwdlzsiczUQwDytLMjcTGuxOAJ3G6ANqSjQ0EpxNpD740q DAOt2VXLV9KPWoBOA0RbdENQ7sNqLVwGRTIRSZVk99Ncs+lYhEBiM0nc3gSW3vdtOE4b cXkvBYCcaiE+3+mNphkHKjHFPfwXDRtczwPTJdo3o/y01TdOJ471WLhRNz/KgemutB2C 9jEcGxdvAg27H0PD1Nc9pUabE5aauSBNCRotycmSpsldCTSWhXolnUcEXCmHfKhnq7ep cpA8E4CYm9h1Bk6LDrP3ukfznVnKU6rQovrPayU5F/2bLZcqNmQm/OHbSpn3scxN+CnY /wZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=U8eJNOHS+aUbBXn7pcWjETPrHmmQZ5+rMmh0rfza66c=; b=jiLOmRz9jGy+KbavMFcKa2le15IItAL6Wbii2Y3XAMtgqW6t65kZdC6zqLL2M/W78u oeFva96iFAe+salsH67SXgTmgaGCI6x3O/rFA5Th5H8aWAQIBsj0Sne02I+Z5cj7gFbj b1PQplIj1rTsVZA6iO/K9PGYd7ssQ5DstrRl47FU0fb7wv3UV+mkMm5Tpvb3YjwD6mh9 2jK4ruV9oVbf9FBWOvgzNl8EAcKiNEYjBW5JwapWdGQpeQBl2lB/7icIl+OJmrUp1NSF YG3IyQIGKe8WMux5AUD5wsAaOIpnkKHMTEpAhaoFfbya54iMQGR0K02Yz+7oJrvuxXEX 6Ipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zs0zlqNz; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rh5si976395ejb.488.2020.12.01.05.55.51; Tue, 01 Dec 2020 05:56:16 -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=@gmail.com header.s=20161025 header.b=Zs0zlqNz; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391284AbgLANwo (ORCPT + 99 others); Tue, 1 Dec 2020 08:52:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387833AbgLANwo (ORCPT ); Tue, 1 Dec 2020 08:52:44 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42E0AC0613D6; Tue, 1 Dec 2020 05:51:58 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id b6so1150231pfp.7; Tue, 01 Dec 2020 05:51:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=U8eJNOHS+aUbBXn7pcWjETPrHmmQZ5+rMmh0rfza66c=; b=Zs0zlqNz5yvaZTjtyetjqTA/N59AU/PLxzuAxbg7oluNJXAAosAncYfbQ4gqeWRl71 0sopphmkSvDUwdoxU3STU6Fj0zCQnup0aNfqEJHDniloim4EqK++ST62cD65exMtHGKG n/rIQrfHyKYn6bxJ6ovXsnXp9iS/A/r93CPe39cL+1xC/5mK5g8eA6JazRuqdu4lT7ZG yjc9sGLJzA82NrkPQasvDOEbbx6Hzbrxl95PTXTJL66BqGMLjKVzuXjENbYZELYFC0Cn WVUjPV7nciq/zytcpXGMwpi50t/QJuxkOreYqpn1JWRMUwURwangM2vGkajqATeC9Q1c LMRQ== 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:content-transfer-encoding; bh=U8eJNOHS+aUbBXn7pcWjETPrHmmQZ5+rMmh0rfza66c=; b=ty2ayfYKtPEYlykA1sloUppvkmZDQo4QGLJ7jIIoMU0UE24rP/LdiJO2VJU9QDn4v4 jeb5W+wWHyHOMOMEblFiK67X0u9SEQ8zrFEMn5u4Lf/aKtuFZLHbnUFd0gw27iD73hpg FoxcpSJMa+BfqOsLqx/BIf6jkeJDzjyFXSc6SLZaPPha09RYSZcG90pKm+rvcNF8gvXm XlJO8Per/OTubzyVDJScKy9Sp7HWIbxS4aJ5XqDlQPeD0VybUVG4g0MCEIbFtg0I1u/g MLYHGBH3toknrvwDPCIRiaXyUdrin3gtqKm8VkoivQPEk8yW0/BaFUnn9SylRuS6TdG/ rh6A== X-Gm-Message-State: AOAM531PdGM91/bmZmrWyBIxjZ2Y7PJXRTiiefpHat2O+kwhQMK8l6eO P0WZQ1B2porQ+8sdiwjJ71P6e971PGr23Ojy5dHXfCDD6wY= X-Received: by 2002:a63:1514:: with SMTP id v20mr2348579pgl.203.1606830717796; Tue, 01 Dec 2020 05:51:57 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andy Shevchenko Date: Tue, 1 Dec 2020 15:52:40 +0200 Message-ID: Subject: Re: [PATCH v4 2/2] usb: typec: tps6598x: Export some power supply properties To: =?UTF-8?Q?Guido_G=C3=BCnther?= Cc: Heikki Krogerus , Greg Kroah-Hartman , USB , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 1, 2020 at 2:59 PM Guido G=C3=BCnther wrote: > This allows downstream supplies and userspace to detect > whether external power is supplied. ... > +static int devm_tps6598_psy_register(struct tps6598x *tps) > +{ > + struct power_supply_config psy_cfg =3D {}; > + const char *port_dev_name =3D dev_name(tps->dev); > + size_t psy_name_len =3D strlen(tps6598x_psy_name_prefix) + > + strlen(port_dev_name) + 1; I'm so sorry by not noticing this one... > + char *psy_name; > + > + psy_cfg.drv_data =3D tps; > + psy_cfg.fwnode =3D dev_fwnode(tps->dev); > + psy_name =3D devm_kzalloc(tps->dev, psy_name_len, GFP_KERNEL); > + if (!psy_name) > + return -ENOMEM; > + > + snprintf(psy_name, psy_name_len, "%s%s", tps6598x_psy_name_prefix= , > + port_dev_name); ...followed by this. Please, use devm_kasprintf() instead. --=20 With Best Regards, Andy Shevchenko