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 855A1C05027 for ; Fri, 20 Jan 2023 14:29:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230003AbjATO3e (ORCPT ); Fri, 20 Jan 2023 09:29:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbjATO3b (ORCPT ); Fri, 20 Jan 2023 09:29:31 -0500 Received: from mx.cjr.nz (mx.cjr.nz [51.158.111.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4895880BB8; Fri, 20 Jan 2023 06:29:03 -0800 (PST) Received: from authenticated-user (mx.cjr.nz [51.158.111.142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pc) by mx.cjr.nz (Postfix) with ESMTPSA id D8F497FC21; Fri, 20 Jan 2023 14:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cjr.nz; s=dkim; t=1674224465; h=from:from:reply-to:subject:subject: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=i/QptElc1Rys5CqmJywuncbTK0Vr1bwZxAuaxjPVSvY=; b=hnQ/nuSjgTb0o46XWymkpchmWuQgCLMXxC3J6dEmG7dImpoRMYBpYt2ZSAMp2rlnWP4H4H 5neXAY8zBU2uoK8yaV284XC5VDDZ+lRNLggbIFbubPYbMl+cif2+3uKGAS/NWYqAsf9Oy3 Y+1bV1YrA/rRlext+QoRd1gbY5DCjTU7hRzF2yUuv2KW4X2uGqNLKVxva8vJJg/mSw6pY3 b2OIgENbIYDfMxyG92nQ2sfh60d0J8XyjztRSdBko3LEOoEloL0ETDdoQBXEp7tJrqWyG0 gWQh+eNUzgnqYRAG7fPve8m1f4ujJX30QHCkbP0cMGOcV18lnVa2QF07uHKX5g== From: Paulo Alcantara To: Andy Shevchenko , Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Cc: Steve French , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Andy Shevchenko Subject: Re: [PATCH v1 1/1] cifs: Get rid of unneeded conditional in the smb2_get_aead_req() In-Reply-To: <20230120120857.60444-1-andriy.shevchenko@linux.intel.com> References: <20230120120857.60444-1-andriy.shevchenko@linux.intel.com> Date: Fri, 20 Jan 2023 11:21:01 -0300 Message-ID: <87r0vpe182.fsf@cjr.nz> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Shevchenko writes: > In the smb2_get_aead_req() the skip variable is used only for > the very first iteration of the two nested loops, which means > it's basically in invariant to those loops. Hence, instead of > using conditional on each iteration, unconditionally assing > the 'skip' variable before the loops and at the end of the > inner loop. > > Signed-off-by: Andy Shevchenko > --- > fs/cifs/smb2ops.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) Reviewed-by: Paulo Alcantara (SUSE)