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=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E2CAAC07E9E for ; Wed, 7 Jul 2021 15:04:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9DC961CCA for ; Wed, 7 Jul 2021 15:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232148AbhGGPGj (ORCPT ); Wed, 7 Jul 2021 11:06:39 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:58528 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232265AbhGGPGe (ORCPT ); Wed, 7 Jul 2021 11:06:34 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 86A94200A1; Wed, 7 Jul 2021 15:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1625670200; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/njSWsFKmrr+gCtk5oLKLx0gnGyNTSkRi3qeU7FkYJc=; b=P70mfZINIHga/GUSB474MUZ/h3uZi7rozCxArusbasTg4gcWmobEYqPY/sTCUi6mNa9C6M ntLaJVEUEtvG2a+WOsc4QvKjikYlix0TusAj5dIxIQDxD6cgxHEuX/pPLRUkgbEEaTTy0Z Y5Jho/NqRo2LT7BAe14b97nzMq97Bn4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1625670200; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/njSWsFKmrr+gCtk5oLKLx0gnGyNTSkRi3qeU7FkYJc=; b=yor2vNtUHhEUakJ1XrwjM1hEGtN2wJ+5A3qSKpDiRDplrJKmbqaMvDu4nVVtruXhxKl8P9 RJF5BX29JgVyqVCg== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 7C8C8A3B8A; Wed, 7 Jul 2021 15:03:20 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id C6A03DA6FD; Wed, 7 Jul 2021 17:00:46 +0200 (CEST) Date: Wed, 7 Jul 2021 17:00:46 +0200 From: David Sterba To: Johannes Thumshirn Cc: Nikolay Borisov , Anand Jain , "linux-btrfs@vger.kernel.org" Subject: Re: [PATCH 2/2] btrfs: change btrfs_io_bio_init inline function to macro Message-ID: <20210707150046.GL2610@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Johannes Thumshirn , Nikolay Borisov , Anand Jain , "linux-btrfs@vger.kernel.org" References: <0ae479ebdecf5501937b5d93449a782d96864cce.1625237377.git.anand.jain@oracle.com> <05870252-7ab1-0306-7360-a6edeed2b168@suse.com> <7ba26789-f98e-adb2-a6d9-7979e519e802@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Tue, Jul 06, 2021 at 06:14:38AM +0000, Johannes Thumshirn wrote: > On 06/07/2021 07:29, Nikolay Borisov wrote: > >> The gain is macro is guaranteed to be inline-ed. A function with the > >> inline prefix isn't. > >> > > In this particular case it's guaranteed that the function will be inlined. > > > > And we also get additional type safety from the function, which the macro > doesn't provide. Yeah, using static inlines instead of macros is preferred when they're reasonably simple, like in this case.