Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1288571
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jens Axboe <axboe@kernel.dk> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] list: introduce list_is_first() |
| Date | Thu, 10 Dec 2015 16:20:01 +0100 |
| Message-ID | <qEbaF-7V7-7@gated-at.bofh.it> (permalink) |
| References | <qEaeC-7jl-25@gated-at.bofh.it> |
| X-Original-To | Geliang Tang <geliangtang@163.com>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Jan Kara <jack@suse.cz>, Josef Bacik <jbacik@fb.com>, Josh Triplett <josh@joshtriplett.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=J21xkNtKP+xwr6cr9HtMevsICsJTGtPTqROJ/v1UzCY=; b=RnWxNX3C4DjfQV10mVYMw2W6u+y3eerF//icbWlBknV/CgtFCoPMh8Zx869R0XJV+s 3Posnf2FlwIzCZ+oYx66msTdEiFYV/INGftfi4TfOXFkrZy+nvifoUD/qZEVvsRAbFKs ssutLiSsM72SUZxAeJMtkhJb7AoyiKtaFfAXGmIpMzfkzuudEgQio0A8RFOubhNkX8Jp eDuwR7BFBjJUIAcgMAV7UC47MKw4i2FsYZrUjLo1la75Unm7ysGSE9pLFF35+REUPtgL zb+kZbz+TfdHiIOQO1LpdFKH+09zx1HfbqhggStGvwBH4moXPvhiEZjF8KGd0G2mcnQx GmFw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=J21xkNtKP+xwr6cr9HtMevsICsJTGtPTqROJ/v1UzCY=; b=CyJ98+oxlh+dSvBDaU2cLAPsN9lMudhjMzm2rgCY55b97Lr8joBigdnRDjJdsuNMiD 41s9PwFfiLqZrexLyyMuwTUnXNTBZoS+dffybJM8ZUW93hWfsiU6Fvd2K2hZ14jViV/M NokShy90LcPzDFpk/ByOop5p5mlco+iarkkr5UgMwFRyBbZP3q77qRA0nHmKSkF7DcqE TLdkKKyZH18ZbomNAT3ClgxuNChjsBtXIw7UWlax4zETez3666qRpoAV1cbFPs9VRPJU u7iI06G+7UCvQYZswoeGh6cniQDqKOTzqNEgXc8LKXIf7A4sOPvFbLyZSq+d+I484BWP tTgQ== |
| X-Gm-Message-State | ALoCoQmJGQUl5IccJMpvXeT1HJ8XGOZu4FNaHgxbRUYc+SXk/huu+R+XKNwtvPiehQnFCPrzJfAE+4w6lQcug+FpjdFxod28Gw== |
| X-Received | by 10.202.71.132 with SMTP id u126mr9610414oia.113.1449760237097; Thu, 10 Dec 2015 07:10:37 -0800 (PST) |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 20 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Josh Poimboeuf <jpoimboe@redhat.com>, Seth Jennings <sjenning@redhat.com>, Jiri Kosina <jikos@kernel.org>, Vojtech Pavlik <vojtech@suse.com>, Pablo Neira Ayuso <pablo@netfilter.org>, Patrick McHardy <kaber@trash.net>, Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>, "David S. Miller" <davem@davemloft.net>, live-patching@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Thu, 10 Dec 2015 08:10:34 -0700 |
| X-Original-Message-ID | <566995EA.80509@kernel.dk> |
| X-Original-References | <305feb971ae11e192f35f25d66bb7b2e28e06c39.1449755818.git.geliangtang@163.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1288571 |
Show key headers only | View raw
On 12/10/2015 07:17 AM, Geliang Tang wrote: > We already have list_is_last(), it makes sense to also add > list_is_first() for consistency. This list utility function > to check for first element in a list. Honestly, I think we already have way too many of these kind of helpers. IMHO they don't really help, they hurt readability. You should know how the list works anyway, and if you do, then it's a no-brainer what's first and last. If you don't, then you are bound to screw up in other ways. Just my 2 cents. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/4] list: introduce list_is_first() Geliang Tang <geliangtang@163.com> - 2015-12-10 15:30 +0100
Re: [PATCH 1/4] list: introduce list_is_first() Jens Axboe <axboe@kernel.dk> - 2015-12-10 16:20 +0100
Re: [PATCH 1/4] list: introduce list_is_first() Josh Poimboeuf <jpoimboe@redhat.com> - 2015-12-10 16:30 +0100
Re: [PATCH 1/4] list: introduce list_is_first() Christoph Hellwig <hch@infradead.org> - 2015-12-10 16:40 +0100
Re: [PATCH 1/4] list: introduce list_is_first() Jens Axboe <axboe@kernel.dk> - 2015-12-10 16:40 +0100
Re: [PATCH 1/4] list: introduce list_is_first() Jiri Kosina <jikos@kernel.org> - 2015-12-10 17:50 +0100
csiph-web