Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4040544rwi; Wed, 12 Oct 2022 09:47:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZzP+wW+TXsSnexD9PGPTKmliK5haz0BMjywJRHOqjqrpTrNODg1OqUycCxEGI8gznWiB4 X-Received: by 2002:a17:902:8c92:b0:178:29d4:600f with SMTP id t18-20020a1709028c9200b0017829d4600fmr31048747plo.40.1665593261405; Wed, 12 Oct 2022 09:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665593261; cv=none; d=google.com; s=arc-20160816; b=MQ+3LcXy+5o0iNXQ5BX9+z+J3c5EM7NUqCcyogz+BqlM9/LCPt0Q7ahmw+Gl8y4o3B e1f4WhnORdZVBMbD+piXmosRTwKYos1+Sxw/cSrrV7CTAZUvHSNRx2JkhUbsZ3ihZk1b 6rECo0hTLMcKTQBdif5J2oLG2wMacHhUmAh8fPpvjTlFmjSz7w0S3V/x+DxZprRbO5I/ sDMXmRSJ1x4jeFzByjaTuipo3R/yMoff1ZyAY5d/XBwZGLkXIBAQdCIsza7fbOJvvX1w WmXC0EV2Dz7hX0VPkr9zk2Y5dkNiXIVjyK32/NVG4NUgk3ogiAqZ17t1D6Qik1ZazBSP 5c/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=o5DBzCeO215OOajCS2K1ajL8njr4qHFYDFUKbY3eWpA=; b=roSbYfej1Ye39HYol6bB6h/DfGykqHTB4taaRL3BpP3Ixi/EU3w7xEQOEmFTbBVO1Q 18DcOWGMicQkG4kf6mGzi55Pj8pmQf+7aV88MyMeNQ9X6hBMoue00j6T22lmJNdCf6L1 3FMP3ifQgbv2ME8T081ZtddG5XZKmcYEWapLWEI76jB5wGmOasH6cLoPL2lzfZStOZbu ttKsdtkarYLh4jkaOk14cVH/BEn+4znz7Tdb9Z1KNcTHVh6nGxqE16pKZd9+B6e5Eu9E Ndj93ATsVPcjeGd1So8FBbN16NeUdHXXXgSvmMu65jUgC4paY7dpYpLC8gjdK7F6ttRy WwyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=YXPd6OUb; dkim=neutral (no key) header.i=@suse.cz header.b=sxpD0K83; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 81-20020a621754000000b005384c4b7969si17315128pfx.316.2022.10.12.09.47.19; Wed, 12 Oct 2022 09:47:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=YXPd6OUb; dkim=neutral (no key) header.i=@suse.cz header.b=sxpD0K83; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbiJLPc5 (ORCPT + 99 others); Wed, 12 Oct 2022 11:32:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbiJLPcz (ORCPT ); Wed, 12 Oct 2022 11:32:55 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A498263D for ; Wed, 12 Oct 2022 08:32:54 -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 26B9E1F381; Wed, 12 Oct 2022 15:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1665588773; h=from:from: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=o5DBzCeO215OOajCS2K1ajL8njr4qHFYDFUKbY3eWpA=; b=YXPd6OUbss93REbGV/CmJjxbHwmkC0TsYZk1bVnom0Q1iIIZF5no88q4JVeP6DWHw9+2lu unMjDS++ewAcMVLvLVkpLaQ1b3PfOMMxs+ApgL3qqxj6RO/6F+FetdS07de0Gs6ZDaK7wV oH7NPHsuXlzYjGI3xwjE1H7YSenWnUI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1665588773; h=from:from: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=o5DBzCeO215OOajCS2K1ajL8njr4qHFYDFUKbY3eWpA=; b=sxpD0K832rcV0dLo5/gu9QOioRlkHQRiDogmh66Lb6Ajohq1bK7IwpC7/c+NKZyPljEKVi nc5QQzVHOA1xvtDQ== 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 F039A13ACD; Wed, 12 Oct 2022 15:32:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pYieOiTeRmPsRAAAMHmgww (envelope-from ); Wed, 12 Oct 2022 15:32:52 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 783C1A06F3; Wed, 12 Oct 2022 17:32:46 +0200 (CEST) Date: Wed, 12 Oct 2022 17:32:46 +0200 From: Jan Kara To: Li zeming Cc: jack@suse.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function Message-ID: <20221012153246.pt6ju4i3cdsenbny@quack3> References: <20221012104235.3331-1-zeming@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221012104235.3331-1-zeming@nfschina.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 12-10-22 18:42:35, Li zeming wrote: > These two functions perform the following optimizations. > 1. Delete the type cast of foo pointer. Void * does not need to convert > the type. > 2. Delete the initialization assignment of bh variable, which is > assigned first. > > Signed-off-by: Li zeming Thanks for the patch. It looks good, I'll queue it into my tree once the merge window closes. Honza > --- > fs/udf/super.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/udf/super.c b/fs/udf/super.c > index 4042d9739fb7..06eda8177b5f 100644 > --- a/fs/udf/super.c > +++ b/fs/udf/super.c > @@ -162,7 +162,7 @@ static void udf_free_in_core_inode(struct inode *inode) > > static void init_once(void *foo) > { > - struct udf_inode_info *ei = (struct udf_inode_info *)foo; > + struct udf_inode_info *ei = foo; > > ei->i_data = NULL; > inode_init_once(&ei->vfs_inode); > @@ -820,7 +820,7 @@ static int udf_find_fileset(struct super_block *sb, > struct kernel_lb_addr *fileset, > struct kernel_lb_addr *root) > { > - struct buffer_head *bh = NULL; > + struct buffer_head *bh; > uint16_t ident; > int ret; > > -- > 2.18.2 > -- Jan Kara SUSE Labs, CR