Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp214826imm; Fri, 3 Aug 2018 02:12:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddLJ2Vs76VSuVofuyZ4CcbauNANRZIT+UFSjO0xsbqgYKr4v41wsUm1VyHcl+uZCU/7RkG X-Received: by 2002:a65:60cf:: with SMTP id r15-v6mr2866962pgv.41.1533287559839; Fri, 03 Aug 2018 02:12:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533287559; cv=none; d=google.com; s=arc-20160816; b=qfpIc9MsjRnLieNQpww3HcewkvNPweWa6Df3BjJofyVKcCYemO/wArPknhTtP1IOzH /iKfCTPoQxrBZHV9lsSlVsTpTio+Cybs99El2Y00C+grrBy1iVKpvWaGxRi7mo+DRoND OJO39hwEgN93ZFRVbm5IjHfwFjRxd/rz6zCDN/MURC7bLKBfpAGG9tE093NrOa0qQ4Am hCF2s5m7V6AP5Cu1wLY22rVis6pVaP1CD/suDtqqkj7a7dX+ZNnv8rq+Nm2m49KNsq7X M3nwmL6iE8xsaKywYYYd8+HdPhbuKJ6ZgHTHQWU3wsri6iq8F0oL79R042sfcQ2IwoS/ 62Mg== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=MjfqrzZHfRpozr0wDlqX5EDiihimjWJcn//FJkUZtP4=; b=NH2CiPISxbpejmaDXVENi4P8mpPLTseQZ7s87IAZABuPfzOh3I34cMnQKEOM3NXDTw nhzTjaUGjqd9uG/Q5v9KG+m4+lbhP5K1dJlhvPwAtOtDhGFGqrNcqceRXdcduuxhqd6J GfKCYRbVjfJtc+klOMljokYBYfkSykv4N9xziXt8s21zYVnFZJiB2Ykh3Yjngwyy57fX nzj5qqIT3K8yYmgUEZJQ/TL4Bv6H6p8WzII1lFyaAILv4aTWi/72iMcIM7vjj7+/kpnl IlFAsFJjJADcObmDUVO36t4PTWO89l9dKOIglY5dJ+6C9Sumg4XTsIh6eqlW6/dADLSs ORCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vIywzkq+; 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 m24-v6si4734801pfk.56.2018.08.03.02.12.25; Fri, 03 Aug 2018 02:12:39 -0700 (PDT) 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=vIywzkq+; 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 S1732414AbeHCLF4 (ORCPT + 99 others); Fri, 3 Aug 2018 07:05:56 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:42178 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729818AbeHCLF4 (ORCPT ); Fri, 3 Aug 2018 07:05:56 -0400 Received: by mail-ua0-f193.google.com with SMTP id w7-v6so3576511uan.9; Fri, 03 Aug 2018 02:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MjfqrzZHfRpozr0wDlqX5EDiihimjWJcn//FJkUZtP4=; b=vIywzkq+zZGo1gXRL6N5GpAeWidMCFUBKtamGi5SdPJrGYovjblX8W67OXnwOmZefj EzvnRNFzeKSRZmkcMyYzW9gJrF6hSYtOnoTpd/HgMrzMuzcg8Qb48dw4qBU29v31EDh8 mwnBh9gVd1kXALXlvcEK/aZVTAKCXmyn0mVDhguY6LoOwHyr6m33CRjySNQpQF70KvI7 N6ZemmQ7BJt7KfvytTUW8gWhlh+7CGb20QJke12oyT5Rum5MO9l3PgPWhDA9M6OrRW5b RP2K1Je13wrUuDCpWsO7F1pVdzOC3XXlCa3C8AV/ZxGRmgVLJ1kG2xCc7lLS3CGjCunK 6vAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MjfqrzZHfRpozr0wDlqX5EDiihimjWJcn//FJkUZtP4=; b=NVUp+7hL5ftnOlDMJvtk2EgH9EGLev9L8sKjoYBsqr3br9MGMrSPmr5FMNnLSiSNSR ic8qpbLa7BQDwoZfL+uWtT1H3DmjGhzYgr9sMjXjryimkWhhcTSU6TVJGMXvPvIakowd V65ZejLNsHb+Vkr0FD7AdWLgrK5Lvr1jyRz7vPre7ERtFGqYlUxonFdXswFwrAPga7v0 cBla5UGgXolJZ3cYFzigSceBG7i9MNa2tHZfNMXnn2g07A0KVSWVJ0xEhCBYxKhXEm/m DjnIshGbHmKenht3qLDiEI5njSLvJJlKLeyqvEJA2VwRkiBd8y8hqCM6unQE1K7ga/i5 i5Lw== X-Gm-Message-State: AOUpUlHqS4KPeubqDOsQ7O5x/i14pKvs+mp+F6V6FZbNNX6UVmsDYHus Gwu0XwJU78Uth0atv5DUTD/8gq2iO9Tv4Y2L+vw= X-Received: by 2002:a1f:4c7:: with SMTP id 190-v6mr1819497vke.63.1533287432131; Fri, 03 Aug 2018 02:10:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Fri, 3 Aug 2018 02:10:31 -0700 (PDT) In-Reply-To: References: <1533179408-20631-1-git-send-email-zhongjiang@huawei.com> From: Andy Shevchenko Date: Fri, 3 Aug 2018 12:10:31 +0300 Message-ID: Subject: Re: [PATCH] scsi:NCR5380: remove same check condition in NCR5380_select To: Finn Thain , Julia Lawall Cc: zhong jiang , Michael Schmitz , "James E . J . Bottomley" , "Martin K. Petersen" , John Garry , linux-scsi , Linux Kernel Mailing List 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 Fri, Aug 3, 2018 at 5:24 AM, Finn Thain wrote: > On Thu, 2 Aug 2018, zhong jiang wrote: > >> The same check condition is redundant, so remove one of them. >> > > If you are trying to find redundant code, your coccinelle script is > dangerously flawed. These days too many coccinelle helpers make people think they are doing right "clean ups" when in the practice they bring the regressions. Julia, is possible by coccinelle to distinguish memory accesses versus I/O? At least it would increase robustness in some cases. -- With Best Regards, Andy Shevchenko