Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp97259pxf; Wed, 24 Mar 2021 22:26:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj3fr7VEwyZxpSCO76UfRqrALytWDw05AtS9Webeje+11Ck3ij13zg3K/BLdPz9JFMpLYa X-Received: by 2002:aa7:da46:: with SMTP id w6mr7257862eds.40.1616650013796; Wed, 24 Mar 2021 22:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616650013; cv=none; d=google.com; s=arc-20160816; b=ZT3VURZkSvQAdJzjgOxCPmtxeXYGdsgFWSAHGMQ1w1awDx7QeEseAJEMdOMW2isEJt NjQE/z7dmR9ACoNy/Y2CBp4a4gZkBgCKJLjNCL68Otesh7kBZx3M5L9Zvgv9I2UzZPK0 ExgN3gfd/3FKxQ2BpU0ROkkMX5nzvXypu6ykANr1mv00kPBlP/KUPIzWhDCWjMRdsZLX uvh5gpRLHWmjBglhOnza/yOmnDg0WKBcroHkFlxhK9eTH6kHidoQm85OJbm4Y805yzHv yVJIrMkFigQtlcPTOlFn6o2/v9BcqyoEisaTCU14LCC01QtTfH+R2CJqHr8rn50r+H+O KMbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=FWiIUfzfzmg/UyJPfZ5eKC2jY996A0w7LSl0n7TyuhI=; b=MdDghE+2qtStTTg9wW5I+e/2Wzp1IfZJfRknGMm2dX3GbyudeF4jUeDgA15/5m/w39 4OwzNP26sWCJkGkva4LNpr+HXSnHLcsvSUbhYcTgUq1Ahtg0ewvXHWMDV/NA804f3nHw nl4Y7WA8kEi8pRZ9wpu/gjSPq1TL6E3jFrQnCwR5f/6Y9sT1UPA4D+YmQBW/hgn5Vb8N MofprtrJzLxPQ2QVqJAPHXTokwf1RtIy0vtGECCTcUaLjjFBlHIyBA3vKEtvsxJb3mUc O1hFt2b4TTvqHi0xCvBLQHIU5USnJftxUjix4Z29fPi29/qdyeABX/vit1Y41nRQtUx8 V39g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dd-wrt.com header.s=mikd header.b=t0Mo6LM+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=dd-wrt.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr7si3593616ejc.596.2021.03.24.22.26.30; Wed, 24 Mar 2021 22:26:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dd-wrt.com header.s=mikd header.b=t0Mo6LM+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=dd-wrt.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbhCYFZ3 (ORCPT + 99 others); Thu, 25 Mar 2021 01:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhCYFZQ (ORCPT ); Thu, 25 Mar 2021 01:25:16 -0400 Received: from mail.as201155.net (mail.as201155.net [IPv6:2a05:a1c0:f001::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0005C06174A for ; Wed, 24 Mar 2021 22:25:15 -0700 (PDT) Received: from smtps.newmedia-net.de ([2a05:a1c0:0:de::167]:36760 helo=webmail.newmedia-net.de) by mail.as201155.net with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1lPIUU-00020F-2a; Thu, 25 Mar 2021 06:25:06 +0100 X-CTCH-RefID: str=0001.0A782F21.605C1EB2.0066,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dd-wrt.com; s=mikd; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=FWiIUfzfzmg/UyJPfZ5eKC2jY996A0w7LSl0n7TyuhI=; b=t0Mo6LM+gA02x5GYCB73fbR3J5es6lKfyIiKIUMD5LEMGp5Uh5NDX2IaNdsg53SWku/80LUQOR0JGY81G8iwtD+y9xiHkMogglqmDnPA9Em8dRuTe5WcWdId/sojkGnZ7p8OybJLEDz+XkNIK6FXeGWPrKn804H4WRwMonpXjUo=; Message-ID: Date: Thu, 25 Mar 2021 06:25:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Thunderbird/87.0 Subject: Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3 To: Dan Carpenter , Namjae Jeon Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-cifsd-devel@lists.sourceforge.net, smfrench@gmail.com, senozhatsky@chromium.org, hyc.lee@gmail.com, viro@zeniv.linux.org.uk, hch@lst.de, hch@infradead.org, ronniesahlberg@gmail.com, aurelien.aptel@gmail.com, aaptel@suse.com, sandeen@sandeen.net, colin.king@canonical.com, rdunlap@infradead.org, 'Sergey Senozhatsky' , 'Steve French' References: <20210322051344.1706-1-namjae.jeon@samsung.com> <20210322051344.1706-3-namjae.jeon@samsung.com> <20210322064712.GD1667@kadam> <009b01d71f71$9224f4e0$b66edea0$@samsung.com> <20210323071945.GJ1667@kadam> From: Sebastian Gottschall In-Reply-To: <20210323071945.GJ1667@kadam> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Received: from [2003:c9:3f4c:a900:4051:3fe6:eb8a:97] by webmail.newmedia-net.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1lPIUT-000IIE-CO; Thu, 25 Mar 2021 06:25:05 +0100 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 23.03.2021 um 08:19 schrieb Dan Carpenter: > On Tue, Mar 23, 2021 at 08:17:47AM +0900, Namjae Jeon wrote: >>>> + >>>> +static int >>>> +compare_oid(unsigned long *oid1, unsigned int oid1len, >>>> + unsigned long *oid2, unsigned int oid2len) { >>>> + unsigned int i; >>>> + >>>> + if (oid1len != oid2len) >>>> + return 0; >>>> + >>>> + for (i = 0; i < oid1len; i++) { >>>> + if (oid1[i] != oid2[i]) >>>> + return 0; >>>> + } >>>> + return 1; >>>> +} >>> Call this oid_eq()? >> Why not compare_oid()? This code is come from cifs. >> I need clear reason to change both cifs/cifsd... >> > Boolean functions should tell you what they are testing in the name. > Without any context you can't know what if (compare_oid(one, two)) { > means, but if (oid_equal(one, two)) { is readable. > > regards, > dan carpenter ahm just a pointless comment. but return !memcmp(oid1,oid2, sizeof(long*)*oid1len); looks much more efficient than this "for" loop > > >