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 24FE3C433DF for ; Mon, 17 Aug 2020 19:29:51 +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 0197B2065D for ; Mon, 17 Aug 2020 19:29:50 +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 0197B2065D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A37389E15; Mon, 17 Aug 2020 19:29:50 +0000 (UTC) Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91A4989E14 for ; Mon, 17 Aug 2020 19:29:49 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id p37so8587512pgl.3 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=foIRXlJM6VTRq4YvRcZOLE9tU5Wtg+69yJf4Zm832hkVtVnxD/+nnaeiA0f8/C90VL 5Lq8gX3MIStbYpviKCNE5HguNecP3L34fPntio6yzFFnhYDgpbVvqePzWu78aX4FcVJb XCQOrcOXKZhCewUTdHgiQHh96NEp4WjqW8EYHLmJYzGxA8uVnUicRFCmex1KaPZdIjIH MVZSLRVkgeRWWvVrFU+qqRZhR05LLprhBuVJQiwFagVeza9EH3Wh5Xq24civK1MhLKYl 4BWW77sEc8oeIEYPthp0Z7seeTAfK1CCSMkkqR6JayIMmn3Lk2zi/xWT1Lt7N8Vt95NW JHDw== X-Gm-Message-State: AOAM53041m/XQdsxa+31nREozGUn3rGdmV8/Ugj/o5oaI0Oi4LujzXmG 370UOgWxOqSccr4ozpXFgj66Xw== 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 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: Subject: Re: [Intel-gfx] [PATCH] block: convert tasklets to use new tasklet_setup() API X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & 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: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx 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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 D39E6C433DF for ; Mon, 17 Aug 2020 19:31:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAE4E2065D for ; Mon, 17 Aug 2020 19:31:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Il4/WYWW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732133AbgHQTbS (ORCPT ); Mon, 17 Aug 2020 15:31:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388419AbgHQT3y (ORCPT ); Mon, 17 Aug 2020 15:29:54 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB03FC061346 for ; Mon, 17 Aug 2020 12:29:49 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id g33so8583494pgb.4 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=g6IZXCBNDHdoeRpct1PzrlBWysg4l+DW6Byn4/VhmmJcCmd2YiSFBEctDa2qV3UhTk /FHrQBuLse3Y1fcB29Ka8NkYy5k4XhgrwNPjYTHjnmwT8NQv5qP8fClvOh7S+c4JI/LE Dozrf9uA/hjLi3+fDhdsdqh/d7SlfZNmLgHPrephUpoV4LpaaFI5fT7uiaaOgewLFDOd FEq+Oxnaqut/1C6fHr7iEfnyZbNieoikHcWuqykm7hHmLqWkr0bpMcLhtPkAfaHhSqrP 2hbYLFvq2xRMjIGKQRMKCb7Of9JisN7K9iiG8t+bduRnskN9YagPxW6qznjgX5RXS2Cq 43gw== X-Gm-Message-State: AOAM532vRYAN58YSCjHi4mnmt2nt6/sIoywsafBAH2m22MQiMUGt8GCn OSCY78OZNNx3j/hZN4ut0Tfaqw== 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 Cc: Allen Pais , jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com, 3chas3@gmail.com, stefanr@s5r6.in-berlin.de, airlied@linux.ie, daniel@ffwll.ch, sre@kernel.org, James.Bottomley@HansenPartnership.com, kys@microsoft.com, deller@gmx.de, dmitry.torokhov@gmail.com, jassisinghbrar@gmail.com, shawnguo@kernel.org, s.hauer@pengutronix.de, maximlevitsky@gmail.com, oakad@yahoo.com, ulf.hansson@linaro.org, mporter@kernel.crashing.org, alex.bou9@gmail.com, broonie@kernel.org, martyn@welchs.me.uk, manohar.vanga@gmail.com, mitch@sfgoth.com, davem@davemloft.net, kuba@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-block@vger.kernel.org, linux-arm-kernel@lists.infradead.org, openipmi-developer@lists.sourceforge.net, linux1394-devel@lists.sourceforge.net, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org, linux-parisc@vger.kernel.org, linux-input@vger.kernel.org, linux-mmc@vger.kernel.org, linux-ntb@googlegroups.com, linux-s390@vger.kernel.org, linux-spi@vger.kernel.org, devel@driverdev.osuosl.org, Allen Pais , Romain Perier 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 C7352C433E1 for ; Mon, 17 Aug 2020 19:31:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9C1142065D for ; Mon, 17 Aug 2020 19:31:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UCpkyaTA"; 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 9C1142065D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4dINdtIrT29PzttnmNgtijuvkGtbExn8HGXvWwQzI+E=; b=UCpkyaTAJYwRkwDGDN8p7+S8o fMGWzgfdiBWZLdf1KSfiURdZEeA+85DMxXbrl/HSEQwmGHqpiAwb8kU8eKyntvfKIC7K6K29kg4od jAB52tH9ELgrplM/Atk3LZzKOt9ssM8fju7vlkTihh25CejGn0oWwgoZHSOj23PcfEtunNBzJnDlF 7smSEpOwdQhwMzJloi0K7z4+AUCXOvykigAKrvHZ8S7+D1EITaPyTgP5HmdLPx6COQvOTwB6FfFjC oDx2yLkZQ3DrtteZ20CBkh/98tcp16Ec8wHMMatq0/DvqAgkDYVGeRbCQIhqcIP9d28PbGq3QE6tR PB3SOxwew==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7kpQ-0007O5-1z; Mon, 17 Aug 2020 19:29:56 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7kpM-0007MA-Su for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2020 19:29:53 +0000 Received: by mail-pg1-x541.google.com with SMTP id i10so3045870pgk.1 for ; Mon, 17 Aug 2020 12:29:50 -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=sZwHWnWxR54ge2B+gZo+o8YZ99mJZefdft8OAKTCmuBNxEx6qUHTsY0hv/Gj7TuCAh 6NvjFBHT4dpcPbuLwHz2o2f5wRqqNsI98hsAo/19pcihy5rylWo5Ybsx5OozBqzgIzYA JFb8XoDM6muhs2TTaepzdk6EGe8HHEifXifjx8pmtpx2rh0gDGzNETf/rvr6NasNxFHj s4zRs/Tz5yx1kZPhUfKXEa5M77R3gUIiHFyTlBfOhcCoAmDzvSU/RS6MeuCZcvEI5h9a J49qk50Y8Kpv+tixjH9BJZNjqFKVRg5ca0EEggBDITro7s1HrOdn80r22mzpLzkFgqPv qNjg== X-Gm-Message-State: AOAM531xMoX2/rX8vzXCN+tdJ4QWeBi6Pw4h8lkmbhmm1CfxUMmNrFpf f9LRSp26m2XpXrXVwOxMvG7GZQ== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_152953_018150_4AE8CDFF X-CRM114-Status: GOOD ( 16.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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, daniel@ffwll.ch, linux-ntb@googlegroups.com, Romain Perier , shawnguo@kernel.org, davem@davemloft.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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