Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5191280imu; Sat, 1 Dec 2018 11:00:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/XBOmBy3lHaMp0XH+eQ28PtFpnPYktCz0zp4ZNsHS1Q/YNifOxZo6Vak4YAYyyEm2Ur0dkM X-Received: by 2002:a63:585c:: with SMTP id i28mr8688961pgm.178.1543690853468; Sat, 01 Dec 2018 11:00:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543690853; cv=none; d=google.com; s=arc-20160816; b=ixGBgJEuUg4J5eLnNz3OXoSroH95HswqaR5lg2Tfg1+kN2dpgLjNiBjqfGyIaU9t/G gv6eewzq92tLB0SstLt0Fcr6wOkn4iTf+8TDAiNb3oqNyEfkV/SKZKIPDDPgA4uExlmP VzEsCP24tnvSj5acHrQvpVhgP8B5efZE6ldA8fCjekpg78Ec90ZbSG5Ttb0iUCPUILQl iTby5udugNrBytPdj28OKsD9upetUdKdNEBFwtB7beCPIaOozcR1MPIMxxMnrBsxutif nfDHXWXZQhL5W3RNF5YDURZSf0AmcIwBTzx9lh52UO0zLjsEoaRQ+y2Le0F/Z81QEQNB VZzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=U7YcdIqzv1sYAlkJ/sjGQIzHUTNivoehXbNlBnCrIt8=; b=EOBp5fzZ4PbAoD31biYF1e2CIN9UbIfJcNFuR/hk4HXM6NJAwSMV95TC6XdjhRH/rc dwv56iUFsWCKVhQarGEoFDB2tLpbnxUB6LlRhZXpZAC4DEcrQIuPfNBkGulQ/kqspaL7 eaGDShC5Ppbn0/Nq/LWlzeq8pz10ycPvpRtVIB/VaOoBwB8//nLSLSSlhKk67wvti1yY ZDHdEjDt4ywunGTG0LIlu9KLOHOQaXrPLGP60W+hJIAe3pwAdk0f4Ja1Opo8LzveMr29 kHV9UWerBMlA9PLCwB3pSTTDOs6j7QbsSl4LHYYTqgv8ZoOuing56LUAqjC0MbqKHCOU 1/rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdc4RqdN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si8192542pgg.72.2018.12.01.11.00.26; Sat, 01 Dec 2018 11:00:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdc4RqdN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725741AbeLBGMb (ORCPT + 99 others); Sun, 2 Dec 2018 01:12:31 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:36723 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725728AbeLBGMb (ORCPT ); Sun, 2 Dec 2018 01:12:31 -0500 Received: by mail-io1-f65.google.com with SMTP id m19so7291407ioh.3; Sat, 01 Dec 2018 10:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U7YcdIqzv1sYAlkJ/sjGQIzHUTNivoehXbNlBnCrIt8=; b=pdc4RqdNO3u5c/PcskeDcB5WpU82VaJaUmUsqP3aNVUSVNFzOTjGHUb1lkRRDAEmAH f3naAS/YQBwAyl5s0ACsuxOEsmvF1lFRAZu+CYZIfRgMY5OIxU7Zx+PUs1BeNp/xuBS0 7ypY/hv8gMO6wuQRqi1I5qdBy163kWOcYzEzCMTFAZK8wqi9r0qnI6/iVTFVmszG0WIO Kqz5LfagK/QpYpWt6tqwzzkGUquWCAJN20iqBH+t+z0i2jpHGmApDi+BuxwVO1H3JLnD 2GcgKgMbfCrRA8iYmKcQbgj75bmGgielCv5CGEBz5YxJEcwWdJjQUMKQdXnfZptFhG7h 8Dcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U7YcdIqzv1sYAlkJ/sjGQIzHUTNivoehXbNlBnCrIt8=; b=HZl8aMYuFTfRfJfEEj9bbToGdujkOitM1IGctDuXqM8cJNsBZSmNStIItQ0+wgDtSY e76JRq+NPNlu4IFJm3lb4LUVgJoMBILl72ImQentXmhXb12zd0hs8DpNn+djd4rdYt1j omMJ7yYZkeETMIAY1mhpLMaVIqPfrM9WBEyFcDi+ES61z8zReTcKuDUZsncUsUJ9hML5 avBj8o5yqDWih/Vh+bTyi5Q91/6HWpiwDljxri1IGuNhdNsK/5w9/r87tCCqRrOiErev SI/Ws3Q1MctEGZkm3c7tNDMrIU1LAiEe42CtBMz6uF7/u9iHK/UPD6ygmPL9Oq2IxNZ0 6log== X-Gm-Message-State: AA+aEWZvxm0mOr0/3NPSiirnKN7zssJYM2K/EntW3ZTh4h6W5H/oji6K IuQ2NYACDXR/GmHssWuoHYxiwLp1+CbAW6BPecg= X-Received: by 2002:a5d:9818:: with SMTP id a24mr8302004iol.225.1543690759690; Sat, 01 Dec 2018 10:59:19 -0800 (PST) MIME-Version: 1.0 References: <20181201142414.7766-1-tiny.windzz@gmail.com> <5682c419-9e44-10ed-6a2e-286e6f5c5def@kernel.dk> <92334639-9d34-5e6a-2c43-945a20077394@kernel.dk> In-Reply-To: <92334639-9d34-5e6a-2c43-945a20077394@kernel.dk> From: Frank Lee Date: Sun, 2 Dec 2018 02:58:57 +0800 Message-ID: Subject: Re: [PATCH v2] block: Change to use DEFINE_SHOW_ATTRIBUTE macro To: axboe@kernel.dk Cc: ed.cashin@acm.org, philipp.reisner@linbit.com, Lars Ellenberg , Josef Bacik , linux-block@vger.kernel.org, josh.h.morris@us.ibm.com, pjk1939@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, nbd@other.debian.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 2, 2018 at 2:38 AM Jens Axboe wrote: > > On 12/1/18 11:31 AM, Frank Lee wrote: > > On Sun, Dec 2, 2018 at 2:11 AM Jens Axboe wrote: > >> > >> On 12/1/18 7:24 AM, Yangtao Li wrote: > >>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > >>> > >>> Signed-off-by: Yangtao Li > >>> --- > >>> changes in v2: > >>> -Modify some function names to avoid compilation errors > >> > >> The fact that your previous patch didn't even compile doesn't fill me > >> with a lot of confidence in the amount of diligence and testing > >> you apply to your patches. > >> > >> Why would you send something out that you didn't even compile? > >> > >> -- > >> Jens Axboe > >> > > These changes are the same and only require a small change. > > Most of the changes are fine, so it's a bit negligent. > > When someone is sending a patch for inclusion, at the very minimum > I expect it to have been compiled, and preferably tested too. Doesn't > matter how small the change is, even a one-liner should go through that. > > That said, I'm not a huge fan of changes like this. It completely > hides what is going on for someone reading the code, and it's not > like there's a win on code size for example. The only win seems to > be that driver writes can't mess it up, which is a nice benefit. > > -- > Jens Axboe > Yeah,you are right.Can you review it? Yours, Yangtao