Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3203620pxf; Sun, 21 Mar 2021 23:52:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsdRkCTqG0wvnKazKZwE5diCji487ct/8teUCp+2kt/P3m5h5Mg8N9mNJ0cMdoGb+bNj1M X-Received: by 2002:a17:906:38da:: with SMTP id r26mr18133542ejd.251.1616395924229; Sun, 21 Mar 2021 23:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616395924; cv=none; d=google.com; s=arc-20160816; b=OvHnIFpeyAaWJagKU26erm5tiC0gNvzazSIWgWOEJCMpsplUe5kXdGUs2IkS24MypR vNwhwLeF9JARj2y8WoVAT33tgSMgODRewycYH6t2KmtWTV5pTtVdLjDLEdN6iwxj85jY PqwfVAn5J1XMgI+unMtZWpkmruYF3ovak9KFFOubNpL0ALs3nqa4wJLjjnUDkY0l6bnH aC24Z2uJZVU15Uc+8tj8SM2p4WHd6Jk+WsudTDZ7PYN1eSPDyd+JqwJBtMBDzl1sfdp+ Edp4rYW+lBBQYcY2+W8ejx7TOOv9xGUqZY+dUxGePZjxbBWwzhS5tF5dUwmNYVbIZzFa LnOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=5W863cWHXM5LGvr7wg5FX0+cNLZ+vk43jC6Q/HDP22Q=; b=mlcM8l4bW8ywEWuSu1gJW/ZqZ4hWCxcpppjAvImWB4jxvU15q67PbGvqhMi9Wc1IRB VvwuQyZ4v8k2NB0QDyDt1i3PSBzEafWmG063RGMB+5r6NB5GB5Iu68LGccLumpWZSxG2 Y54fKk5330TWsOYnPwk1t9PaFN4uIL+rU8bzhy18pcePbdyXTw1FIsaVNZMfeL6LKnR0 wW7VfW4ZTq0ABfmYtf18WqZa+SwPV9K30rU8pytgiVvRIA+31B3SYJei6pA9Qx4pWbXq V6uWG2W4ts1fo3CbTqggTV2M51TSZCVEQHr0FnV18NMxOnPlBYhBLNiWDw03sMaN/4is wuRQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si10514513edy.321.2021.03.21.23.51.41; Sun, 21 Mar 2021 23:52:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbhCVGuo (ORCPT + 99 others); Mon, 22 Mar 2021 02:50:44 -0400 Received: from verein.lst.de ([213.95.11.211]:53622 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbhCVGuQ (ORCPT ); Mon, 22 Mar 2021 02:50:16 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id EE2BA67373; Mon, 22 Mar 2021 07:50:11 +0100 (CET) Date: Mon, 22 Mar 2021 07:50:11 +0100 From: Christoph Hellwig To: Dan Carpenter Cc: Namjae Jeon , 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 Subject: Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3 Message-ID: <20210322065011.GA2909@lst.de> References: <20210322051344.1706-1-namjae.jeon@samsung.com> <20210322051344.1706-3-namjae.jeon@samsung.com> <20210322064712.GD1667@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210322064712.GD1667@kadam> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 09:47:13AM +0300, Dan Carpenter wrote: > On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > > +static unsigned char > > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) > > +{ > > + if (ctx->pointer >= ctx->end) { > > + ctx->error = ASN1_ERR_DEC_EMPTY; > > + return 0; > > + } > > + *ch = *(ctx->pointer)++; > > + return 1; > > +} > > > Make this bool. > More importantly don't add another ANS1 parser, but use the generic one in lib/asn1_decoder.c instead. CIFS should also really use it.