From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A3CBC433E1 for ; Mon, 17 Aug 2020 19:29:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 361A02065D for ; Mon, 17 Aug 2020 19:29:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Il4/WYWW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 361A02065D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D783589E41; Mon, 17 Aug 2020 19:29:50 +0000 (UTC) Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C71289E15 for ; Mon, 17 Aug 2020 19:29:49 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id x6so8571951pgx.12 for ; Mon, 17 Aug 2020 12:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IQEFM5eDrlk4uN0cUulgaoouXT3z+FbkNrUscxGEwfY=; b=Il4/WYWWqFE/qAzOwm9kfMC9NOlA004aXkbH1fIy/V7R5qAIiigoyGwSXJeap5fGzZ IAtDk7ThFw+I+uoN3iEBR0k7l7V4G8iWozOPbWwoF8xpj+feXJjxWDmDJxCbi3yVIIz4 DcKKycHMZ5M8iGH9xX6OxumCJ3bPk/sESXWCs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IQEFM5eDrlk4uN0cUulgaoouXT3z+FbkNrUscxGEwfY=; b=nv170qmHot/mC3YSn5Xp8FdFqlh1maKu6kGNDT4Mf1XvmJ5ifmTu29BIZe+LjJjygg om0sdqx1yZ60LyTPZZ6yfbWFt82l8/O8aoFC6GSnObrmAYg2pvby9gpVJQCNHdW5woES AFiEKQ9vkx2vcyeRtoLmoYARP/8mczcGUjwZjrkiX73WXW4K2+FO3y7zT5dF7tWGQtbY S32ZdjhhGQ2aKhTTmH0ORIshak7CLuotLu+IELJ6H1j4EBxJlyMluHmqJbxipAJ7cERj qqy/E1mfTejKBdACdBGSd9nPZCnTAhKhkltU5R+Q5JqrQco7its8J4XF5EhpMWoLQln+ i0YA== X-Gm-Message-State: AOAM532MLIUuz2EeFpSihqdB0RyOO9NTdq09ATjuPpv+2pxJZRVqsQx0 Dxy7CSNaY2pTOo37OLYvpr2GgA== X-Google-Smtp-Source: ABdhPJxcba+zdwEuQprcShXltivd2diUYpTiu6P3/hYoUspmLcf/BB1Tt2/E3lFjFEP7byFNgsURlA== X-Received: by 2002:a63:2e87:: with SMTP id u129mr11009060pgu.347.1597692589083; Mon, 17 Aug 2020 12:29:49 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id h19sm18737765pjv.41.2020.08.17.12.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 12:29:47 -0700 (PDT) Date: Mon, 17 Aug 2020 12:29:46 -0700 From: Kees Cook To: Jens Axboe Subject: Re: [PATCH] block: convert tasklets to use new tasklet_setup() API Message-ID: <202008171228.29E6B3BB@keescook> References: <20200817091617.28119-1-allen.cryptic@gmail.com> <20200817091617.28119-2-allen.cryptic@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ulf.hansson@linaro.org, linux-atm-general@lists.sourceforge.net, manohar.vanga@gmail.com, airlied@linux.ie, Allen Pais , linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, James.Bottomley@HansenPartnership.com, kys@microsoft.com, anton.ivanov@cambridgegreys.com, devel@driverdev.osuosl.org, linux-s390@vger.kernel.org, linux1394-devel@lists.sourceforge.net, maximlevitsky@gmail.com, richard@nod.at, deller@gmx.de, jassisinghbrar@gmail.com, 3chas3@gmail.com, intel-gfx@lists.freedesktop.org, kuba@kernel.org, mporter@kernel.crashing.org, jdike@addtoit.com, oakad@yahoo.com, s.hauer@pengutronix.de, linux-input@vger.kernel.org, linux-um@lists.infradead.org, linux-block@vger.kernel.org, broonie@kernel.org, openipmi-developer@lists.sourceforge.net, mitch@sfgoth.com, linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, martyn@welchs.me.uk, dmitry.torokhov@gmail.com, linux-mmc@vger.kernel.org, sre@kernel.org, linux-spi@vger.kernel.org, alex.bou9@gmail.com, Allen Pais , stefanr@s5r6.in-berlin.de, linux-ntb@googlegroups.com, Romain Perier , shawnguo@kernel.org, davem@davemloft.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote: > On 8/17/20 2:15 AM, Allen Pais wrote: > > From: Allen Pais > > > > In preparation for unconditionally passing the > > struct tasklet_struct pointer to all tasklet > > callbacks, switch to using the new tasklet_setup() > > and from_tasklet() to pass the tasklet pointer explicitly. > > Who came up with the idea to add a macro 'from_tasklet' that is just > container_of? container_of in the code would be _much_ more readable, > and not leave anyone guessing wtf from_tasklet is doing. > > I'd fix that up now before everything else goes in... As I mentioned in the other thread, I think this makes things much more readable. It's the same thing that the timer_struct conversion did (added a container_of wrapper) to avoid the ever-repeating use of typeof(), long lines, etc. -- Kees Cook _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel