Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3785829pxf; Mon, 22 Mar 2021 15:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza5019feK0OUQfsOIFsxJAzkWSaR4X1KtqrodTzvOI4F5UibpH6D4RBe95xx8ZpXFEXZH/ X-Received: by 2002:a17:906:37db:: with SMTP id o27mr1965252ejc.60.1616451648466; Mon, 22 Mar 2021 15:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616451648; cv=none; d=google.com; s=arc-20160816; b=NnNcaGtpVaYspwsr3JBr/NebzOS7Jb0eHYJVyxVQ7wRngg6qVIh8lUj2+QUQ609mGX GQ9Go52Zo8QHRZniRr0nKwDuLng0Xzpi0xVHwOLMe+PKUJts/6KxMnreUmBltIab9Lai 8agm3AIlG4p+9vSrNsBaiFbFNs+b/TJKwWfaz9KQqWM0CBcC+ScnO/OnJY52yE34qX8d T3curdtEx0WRr1fjzwA8g+LfKA0oAuzOEJmnppEx3Yp0+haQ1WIB9h+R9msIbfIPlgyl VDJQ5+pUWhW3ni7gSc/Ih1wBR5X8Hr8+416baYMOxvMqyI4NnaiRUL1BOcmXXOJzAeRP nbTA== 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; bh=NHsFX5MxjeF+VaAwcwyWFoKD78wZlg9OURQbD+OIWjI=; b=iBjmNS66gPHrr8TsqVjI6p6DxnVEuKkPQyfqQI7T6+JSmmU8EqCrpJkFX+MaWsP4Gi gxLOxVNoAlNxDhshE7sl3D3II8xs0/dax51PBedc7jIp3VjH5VOkO4EcsyylSYwBppgu fKifSziZLAt+z6JlJifKXQU2UseS+HDszOYO7whBF/eAsKevfQOC82xjFd58fOATiKgR uRlXVpvyaVzzJEkANhcYrXc8jDwwVFgrdvHb5YwGcwDpNJBhFpqzTR3Eh64qJr+f7MNm +RIZEVCIX8YLOufzl9cXNOKW9Y+ZkNZJG+L2lrbFHC/fQfIB9qfmf+NAacFPZcdhMDB8 D93A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="lRF/zob9"; 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 t19si12756242ejd.179.2021.03.22.15.20.25; Mon, 22 Mar 2021 15:20:48 -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=@infradead.org header.s=casper.20170209 header.b="lRF/zob9"; 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 S229962AbhCVWTT (ORCPT + 99 others); Mon, 22 Mar 2021 18:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230016AbhCVWTQ (ORCPT ); Mon, 22 Mar 2021 18:19:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44614C061574; Mon, 22 Mar 2021 15:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NHsFX5MxjeF+VaAwcwyWFoKD78wZlg9OURQbD+OIWjI=; b=lRF/zob9BaEhB0ShW00Zg6tQC4 GYTJS0a3vdB87rFIsddE92qBPvZez5JPYt5PPnZhpyZcPWMFw6E6PWJsk8Nll/c5p6M4q3NLH4Dv+ iVSaJQjLNW9dbd4gBjHUBlB52OTsTx/lfg8jfOQ0dO+GhlnWwQW4bwsAuBq4nRCuT4IzeH3Q/6Zri zq5tVOo5meCFreI34KxT+59bGXMex4D+q+QV0RoumOPpOCk+OFo5xevvWcpp08LZtVY1cjeoUxDIC Lf9GeU0rjy/X6n6X1etT3+jIowXBTUqzMBOHDl6c8aU8odIlj/QCQNXIwsvOHDgW993Bwbua8mlc7 6U3bCzGg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lOSsK-009A1r-Qz; Mon, 22 Mar 2021 22:18:28 +0000 Date: Mon, 22 Mar 2021 22:18:16 +0000 From: Matthew Wilcox To: 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, dan.carpenter@oracle.com, colin.king@canonical.com, rdunlap@infradead.org, Sergey Senozhatsky , Steve French Subject: Re: [PATCH 1/5] cifsd: add server handler and tranport layers Message-ID: <20210322221816.GW1719932@casper.infradead.org> References: <20210322051344.1706-1-namjae.jeon@samsung.com> <20210322051344.1706-2-namjae.jeon@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210322051344.1706-2-namjae.jeon@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 02:13:40PM +0900, Namjae Jeon wrote: > +#define RESPONSE_BUF(w) ((void *)(w)->response_buf) > +#define REQUEST_BUF(w) ((void *)(w)->request_buf) Why do you do this obfuscation? > +#define RESPONSE_BUF_NEXT(w) \ > + ((void *)((w)->response_buf + (w)->next_smb2_rsp_hdr_off)) > +#define REQUEST_BUF_NEXT(w) \ > + ((void *)((w)->request_buf + (w)->next_smb2_rcv_hdr_off)) These obfuscations aren't even used; delete them > +#define RESPONSE_SZ(w) ((w)->response_sz) > + > +#define INIT_AUX_PAYLOAD(w) ((w)->aux_payload_buf = NULL) > +#define HAS_AUX_PAYLOAD(w) ((w)->aux_payload_sz != 0) I mean, do you really find it clearer to write: if (HAS_AUX_PAYLOAD(work)) than if (work->aux_payload_sz) The unobfuscated version is actually shorter!