Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5354290pxb; Wed, 19 Jan 2022 16:53:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwdnSFLctofua+PXTtCRb2jJUwvlB82g4aKoa18cSZOr2o5BilEHj10UU6Cw1d3+3EdOif X-Received: by 2002:a17:902:e889:b0:14a:5d08:d209 with SMTP id w9-20020a170902e88900b0014a5d08d209mr35084038plg.159.1642639998960; Wed, 19 Jan 2022 16:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642639998; cv=none; d=google.com; s=arc-20160816; b=zynTtVzdWxnch7UDinxJd+0/l3PiRteyJ7KB7Gxi2KbSK5Sl9qElFKUbCIyCmskGyg p22mCK2s0VBcTUjeZPGUFf5NuIU7x9oXQ2rx1avurL3j0H/uV/5xVcc6iahOKTgJC+1L 0W1zSvfjz4SsJNIdquf9FO56jKQCO9gJSv/PxgqaJjS9V9g1t7cYvFSiQ+eFuGJgEx/H GP24UX/wRDULksW3wYWiqac6N15B31KjnLuxv8+ciPto4Hd57zYt2OdQVvAgsPTL4bek u5A5UTYDYBHP5GwwdnEsz9r3UahwWfpAZnJFyKvMAM5Rm0Ynb8IwI7v+9gzIf0RrKLdE cA7A== 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=4nJyI6eUhIELdgXFkdrBzVMhM0Y1Gcauhxwwo0CSvpo=; b=yeRtgB0CofXD8LfwSqlD2hDwCjqTbBmwSgIP0q6PkGyfkQ6lPqOz5/9OQuIPMNqsHv 9IJUxAQd7XuINZynDWtY0HmJGxR2sJyt9mi6dY/+U5IZ0KpLjG7WtXhqjW2Nnkkc7m2E NdrGBOwQ6q7dophOgMv6WI6K+g2DdSW1YFbE7kKRZkmo6/UDlcuBuSK518mYlLVIyfge fbG3omQkVDnkzQDuk/GiFt+oHuBUDP6Uery+qhMHNvjKLwvipXwzyz6Oo2TrB2wTHGFm 8g0K+lIG9yMtHErPrl0WaBFrbhgQLK1ZWxf+iWvJguLoV8NzwOzKpBlqjNrdy0g2xgGi vB2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="a7wHf17/"; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gl18si6866474pjb.151.2022.01.19.16.53.07; Wed, 19 Jan 2022 16:53:18 -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=@chromium.org header.s=google header.b="a7wHf17/"; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345667AbiARJZY (ORCPT + 99 others); Tue, 18 Jan 2022 04:25:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345659AbiARJZX (ORCPT ); Tue, 18 Jan 2022 04:25:23 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7863C061574 for ; Tue, 18 Jan 2022 01:25:22 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id x15so16976759ilc.5 for ; Tue, 18 Jan 2022 01:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4nJyI6eUhIELdgXFkdrBzVMhM0Y1Gcauhxwwo0CSvpo=; b=a7wHf17/waSeg4gU4SCxg3XtQIQmgnZ9oLXhXsh7E6nGZEX8a9pxmky5RpdL4SEpJF XyqfRtUuMs6UOq3c64hLYLesUR/BCqpoFrOmKQXH6o6/d7pnOBTpvnlbhDASEpBfBiFf aSCrNFayKE6moPZZtaoUAgMu4QRgE4GJbE01I= 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=4nJyI6eUhIELdgXFkdrBzVMhM0Y1Gcauhxwwo0CSvpo=; b=QdxOhNLqxvcwTrrHuJJShSg23g90X8VeMTFy06Q8onn5oRMxP21AqlSYdKH6zfvv20 7lHB7vPiInx5c9PDuSOVWggKP5/doN59pxDre+LYIl95WLKLo7TZAtI8PxVIQnKnu2nf FlGNnYM/Uz3AOYcgBUlYb8gwq5dFUP9NvFEXLPdike71ZggeB1Oe9TZgEH9XoP/PxRgP Be94WiUd0mXRlNW33YcZDcpwbmXNhppFwxGSMlpPe5A4M4iUHK0BviA2y/ArO0CqTaZL vj135k1gpZ7XzyqWdjuJPlLVgU5I8KtuHshiXR9RBgQi+QW699oVWpoOkbmI8YUl2tgM A2ww== X-Gm-Message-State: AOAM5319ZVLP1SrF+u/Gz6z0g3W5EPPb8m8hWvA4mR0Gz57jdCdb2xXc XUQzibgyuQWSiMRwHnD64l5SBSDB0419hACZT9MjNw== X-Received: by 2002:a05:6e02:1946:: with SMTP id x6mr12916718ilu.10.1642497922291; Tue, 18 Jan 2022 01:25:22 -0800 (PST) MIME-Version: 1.0 References: <20220113082918.2279347-1-hsinyi@chromium.org> In-Reply-To: From: Hsin-Yi Wang Date: Tue, 18 Jan 2022 17:24:56 +0800 Message-ID: Subject: Re: [PATCH v3 1/3] drm/bridge: anx7625: Convert to use devm_kzalloc To: Robert Foss Cc: Rob Herring , Xin Ji , David Airlie , Daniel Vetter , Laurent Pinchart , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , Sam Ravnborg , Maxime Ripard Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 17, 2022 at 6:04 PM Hsin-Yi Wang wrote: > > hi Robert, > > The second patch depends on "drm/bridge: anx7625: send DPCD command to > downstream" (https://patchwork.kernel.org/project/dri-devel/patch/1f36f8bf0a48fb2bba17bacec23700e58c1d407d.1641891874.git.xji@analogixsemi.com/). > But I'm waiting for Xin Ji's response for that patch. > Hi Robert, I've rebased to the latest drm-misc-next and sent v4: https://lore.kernel.org/lkml/20220118092002.4267-1-hsinyi@chromium.org/T/#t I also discussed with Xin Ji about the dependent patch and included it in the series. Thanks. > Thanks > > On Mon, Jan 17, 2022 at 5:40 PM Robert Foss wrote: > > > > Hey Hsin-Yi, > > > > > > On Thu, 13 Jan 2022 at 09:29, Hsin-Yi Wang wrote: > > > > > > Use devm_kzalloc instead of kzalloc and drop kfree(). Let the memory > > > handled by driver detach. > > > > > > Signed-off-by: Hsin-Yi Wang > > > Reviewed-by: Xin Ji > > > --- > > > v2->v3: remove kfree() in anx7625_i2c_remove(). > > > --- > > > drivers/gpu/drm/bridge/analogix/anx7625.c | 10 +++------- > > > 1 file changed, 3 insertions(+), 7 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > > > index 0b858c78abe8b6..d3661c78770a8f 100644 > > > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > > > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > > > @@ -2515,7 +2515,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, > > > return -ENODEV; > > > } > > > > > > - platform = kzalloc(sizeof(*platform), GFP_KERNEL); > > > + platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL); > > > if (!platform) { > > > DRM_DEV_ERROR(dev, "fail to allocate driver data\n"); > > > return -ENOMEM; > > > @@ -2527,7 +2527,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, > > > if (ret) { > > > if (ret != -EPROBE_DEFER) > > > DRM_DEV_ERROR(dev, "fail to parse DT : %d\n", ret); > > > - goto free_platform; > > > + return ret; > > > } > > > > > > platform->client = client; > > > @@ -2552,7 +2552,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, > > > if (!platform->hdcp_workqueue) { > > > dev_err(dev, "fail to create work queue\n"); > > > ret = -ENOMEM; > > > - goto free_platform; > > > + return ret; > > > } > > > > > > platform->pdata.intp_irq = client->irq; > > > @@ -2637,9 +2637,6 @@ static int anx7625_i2c_probe(struct i2c_client *client, > > > if (platform->hdcp_workqueue) > > > destroy_workqueue(platform->hdcp_workqueue); > > > > > > -free_platform: > > > - kfree(platform); > > > - > > > return ret; > > > } > > > > > > @@ -2666,7 +2663,6 @@ static int anx7625_i2c_remove(struct i2c_client *client) > > > if (platform->pdata.audio_en) > > > anx7625_unregister_audio(platform); > > > > > > - kfree(platform); > > > return 0; > > > } > > > > > > > I just had a look at applying this series, but it fails to apply on > > drm-misc-next today. > > > > Could you send a v4 that applies cleanly, and I'll try to be quick > > about applying it. > > > > > > Rob.