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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25BBCC433F5 for ; Fri, 20 May 2022 10:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231938AbiETKF0 (ORCPT ); Fri, 20 May 2022 06:05:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbiETKFZ (ORCPT ); Fri, 20 May 2022 06:05:25 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7234CA30BC for ; Fri, 20 May 2022 03:05:23 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 315E61F45B; Fri, 20 May 2022 10:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1653041122; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aU5wzovnUomvZsjKJmtXUhZ/t5Sv4xwETVxxbT/dmQ0=; b=NnEk8ObneQxwFjdMtkzUPsxw4x9H/xeelEtpS0rM6zRNmaVWaN88KXj5CigNUu7euTngec xptpybzCwU6Lp+5kb3/ChryoC0puBR7XqDkQbIyLQD3GubtLR6Us9FzrpznUl9VmUZRQnt 1WnqaSkyK5xjxym8hThB35jWEvaHCWk= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D2B5C13AF4; Fri, 20 May 2022 10:05:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bf7GMOFnh2KKAQAAMHmgww (envelope-from ); Fri, 20 May 2022 10:05:21 +0000 Message-ID: <97a90ce3-bc2a-dd3a-7a14-61b37900a537@suse.com> Date: Fri, 20 May 2022 13:05:21 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 04/15] btrfs: remove duplicated parameters from submit_data_read_repair() Content-Language: en-US To: Christoph Hellwig , Chris Mason , Josef Bacik , David Sterba Cc: Qu Wenruo , linux-btrfs@vger.kernel.org References: <20220517145039.3202184-1-hch@lst.de> <20220517145039.3202184-5-hch@lst.de> From: Nikolay Borisov In-Reply-To: <20220517145039.3202184-5-hch@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 17.05.22 г. 17:50 ч., Christoph Hellwig wrote: > From: Qu Wenruo > > The function submit_data_read_repair() is only called for buffered data > read path, thus those members can be calculated using bvec directly: > > - start > start = page_offset(bvec->bv_page) + bvec->bv_offset; > > - end > end = start + bvec->bv_len - 1; > > - page > page = bvec->bv_page; > > - pgoff > pgoff = bvec->bv_offset; > > Thus we can safely replace those 4 parameters with just one bio_vec. > > Also remove the unused return value. > > Signed-off-by: Qu Wenruo > [hch: also remove the return value] > Signed-off-by: Christoph Hellwig Reviewed-by: Nikolay Borisov