From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [net-next][PATCH] inet: Use switch case instead of multiple condition checks Date: Wed, 9 May 2018 22:48:48 -0700 Message-ID: <527dc805-c06e-2414-f11d-85c1addfcc50@gmail.com> References: <1525930656-6901-1-git-send-email-lirongqing@baidu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Li RongQing , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f171.google.com ([209.85.192.171]:40916 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633AbeEJFsu (ORCPT ); Thu, 10 May 2018 01:48:50 -0400 Received: by mail-pf0-f171.google.com with SMTP id f189-v6so524775pfa.7 for ; Wed, 09 May 2018 22:48:50 -0700 (PDT) In-Reply-To: <1525930656-6901-1-git-send-email-lirongqing@baidu.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/09/2018 10:37 PM, Li RongQing wrote: > inet_csk_reset_xmit_timer uses multiple equality condition checks, > so it is better to use switch case instead of them > Why is it better ? I prefer the concise form, and compiler really should not care.