Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp448480pxb; Tue, 14 Sep 2021 00:51:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDprSqoozOJS9hGAIQpUn2NZgfA+ISNYLPrALonxL82EvbnYHSm8godipy6Ic8FtV78pHh X-Received: by 2002:a05:6e02:20e7:: with SMTP id q7mr11701011ilv.212.1631605906516; Tue, 14 Sep 2021 00:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631605906; cv=none; d=google.com; s=arc-20160816; b=DXmKj4fkcJCYpKxT525dxoUN/Vpq+IpF6qUz/MZ71ERPsaEOF20mpQkLT1MVDAMco4 3cgwqYBgD6Pl1ddm3QiKEylclwwQIre6g1PaMKO42Pp+ZdGa41+c0xkTnr0p9o3rynFq 8KXzNL1f9OterRapgavmbNOJ0e1i0OAkTL5xMrV5dK/jyP8T34N68tsSJgel34kVqb2a DeGys1Ak/HDFeWPg5+e67c1IZszUsoN0H29vfywtu+EoSoheftSCx+pPZuJnub9Tj7GU SCQZ0bLi/bDBZe+HOig9wN27gkG/iVMgBu5Gx1xaEE5v+i4koNe7WRNfGwZUEUp0tki5 FDiA== 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=twA4k54DR1XC21StOFmDZzFZ+sd3DWgF5E9CDyEkCU8=; b=hfREXLo8tcv72/QBpEEfhEyrHXszX+IYADHMNj5V9WO/H432RLEWEiY1u1zwvGRrvG kUsCvVJy1zPjfHACE/Pibb363uiVzD1U6QnaTBMJ0oZUzoWzFYyiw26Rqvowt58kkbtF 61lKf58OL7oAuNAMsrypgmfTAt7b+2tn48ryOVn/XdHExeIzfsImpFp16t5o9+G6kBX2 Jb0ntTZbiF2yuoGpiHPla35A4AkaSLO/Mw81Jh7M8h2TglfKB3KeS9yaxW8YUQ2dTf+O 3+WZ8CgfHJyt7setVu6dbGtINUGLh+GYjaXG9kJ7gfrwVO/yc48xHhlRer4EzjXU/ABy kLUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ty4PkoKL; 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 h25si10006517ioj.39.2021.09.14.00.51.35; Tue, 14 Sep 2021 00:51:46 -0700 (PDT) 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=Ty4PkoKL; 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 S230139AbhINHv4 (ORCPT + 99 others); Tue, 14 Sep 2021 03:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233096AbhINHvm (ORCPT ); Tue, 14 Sep 2021 03:51:42 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49F79C061D7E for ; Tue, 14 Sep 2021 00:47:21 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id y16so26238720ybm.3 for ; Tue, 14 Sep 2021 00:47:21 -0700 (PDT) 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=twA4k54DR1XC21StOFmDZzFZ+sd3DWgF5E9CDyEkCU8=; b=Ty4PkoKLBZwVPLC2TX10fKYHhH6PGv80LcA6Fb0BpQrZeKu+DQB3EzhglyL0L6mvuo 3kO2wEoKMY7ao7gyawgUGvkrH19YbGr5Vpt0GZ+GJmJvS69Gtg0It2MqbPDNB7/RWgmb AnpUtRwIPwxFAi2USPk9u3dNPVa+q6TFmmN4c5GP/ek11NJvc+wbIvzXEx36ogmp6Pke Nn5BMcp/ZTsgcqoS3bbb1srZ3ZcakiAEvq+CGLr6o8QdlWUMXXBuB1EDlRjvW1ArgInx CwLYP4yvmYosCrz74mLzD3rOOAi8poFeN1jIP/IRc98pBzyUXFwnrGjmU+ylOejIT9ot Oe/g== 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=twA4k54DR1XC21StOFmDZzFZ+sd3DWgF5E9CDyEkCU8=; b=381jSd4SM6Jz8Btzf1840zWwu/h2ZWJwd9HJIvBf/ECpAbZcbonM3h399leXEoqrW4 dQgncWsSxZ3p4TcvaOggDH3HG9UDjHc/ER1sPopTtyIIOWQ/+bP3zcJNVubjh/tHFOAA MirysFbSPdfC3OjsQXQDbnMde+rHo6lNnsOZtqZSaR4NwVdIH31gJAClEhDXISmMGL6M kT0kO/V3q9Opal4LhA4wQAZCu8RlruD9GvMTMa1GiYp2nfQLDYw9RIQAdVUbR6TCR5xR MWhpqdxgV+S/L1r+qo+x9/xp0ffx26Q4LOQr6HcGlK+l0AHe0Q9nQOZJld8zCiyP+GrI bKKQ== X-Gm-Message-State: AOAM5332m1hmXAt0g18JLyvNyELXqKmwhaeceB16dEg6hJXreJq7d6tl vjtUYKPDU+/dKiUpG5MD2wlt7h4ZdUhh6xN2gftzKA== X-Received: by 2002:a25:af49:: with SMTP id c9mr17182208ybj.432.1631605640407; Tue, 14 Sep 2021 00:47:20 -0700 (PDT) MIME-Version: 1.0 References: <20210914043928.4066136-1-saravanak@google.com> <20210914043928.4066136-4-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Tue, 14 Sep 2021 00:46:44 -0700 Message-ID: Subject: Re: [PATCH v1 3/5] driver core: Create __fwnode_link_del() helper function To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , John Stultz , Marek Szyprowski , Rob Herring , Andrew Lunn , Vladimir Oltean , Android Kernel Team , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 12:05 AM Geert Uytterhoeven wrote: > > Hi Saravana, > > On Tue, Sep 14, 2021 at 6:39 AM Saravana Kannan wrote: > > The same code is repeated in multiple locations. Create a helper > > function for it. > > > > Signed-off-by: Saravana Kannan > > Thanks for your patch! > > > --- a/drivers/base/core.c > > +++ b/drivers/base/core.c > > @@ -101,6 +101,19 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup) > > return ret; > > } > > > > +/** > > + * __fwnode_link_del - Delete a link between two fwnode_handles. > > + * @link: the fwnode_link to be deleted > > + * > > + * The fwnode_link_lock needs to be held when this function is called. > > + */ > > +static void __fwnode_link_del(struct fwnode_link *link) > > Why the double underscore? Because unlike fwnode_link_add(), this one needs the lock to be held. -Saravana > > > +{ > > + list_del(&link->s_hook); > > + list_del(&link->c_hook); > > + kfree(link); > > +} > > Apart from that: > Reviewed-by: Geert Uytterhoeven > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds