Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3228739imm; Sun, 7 Oct 2018 23:44:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Khb86eDogvsbSzosVelzxFRn9k1vsL67bgZB4MkZMARLV2tkADvWPMmdnHYxT7ouSHZDg X-Received: by 2002:a63:d70c:: with SMTP id d12-v6mr19800095pgg.110.1538981077980; Sun, 07 Oct 2018 23:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538981077; cv=none; d=google.com; s=arc-20160816; b=XUDLU+VEmGVTIPWZgJ/K4p9SZDdO1CnDvGOHjsqGPG2bbuE/o1OLlM2pv89s73eC7b hnBOeZjqAAYWzZSSuPxippO4QLzsvlWH3f9r18QzlQtFPnYHSS7uWYFpJJtVE3BnJfKE +ZcbgYzEtBZ+Rh1MCz6SwAv+Z0f9g3wk5aQE3MOqtnziEAIm5CNSJ/hydNGEmJpSUp/Y FlwfnQhc0DEcpWVtC30Zxkyi6JaH30SCg8N0ZzAj+PgigCLQBYswTjc2u73G0cAf4E/2 g4NwDJCuGSKjtyzAOKVJH//wUPNRaJR/+YIdC3FXvXXhvzs1XGnN2NcbjtWJrgFCA3D4 kivw== 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=wxXzZzH/WuAUz2hsKhOq6X6eSW+Olg6W4tnfFIsFAAk=; b=glLqz9hQzxA+4fcb/ZG4u2EIJkWejK6LP5QIE3sIPeq1DUdlWE8GERz8bGazBG00SF gK9ShwxlmW0r/451Gjz4lsH86sBZgL6caMwQ/EnOU0WUQWCvLQYPtZ4vSIwAOpUb5sHG jB+S6CqtaU7FVul/vPiwCAbsYxsnFQH+uM3jwBB3s5YIyM/TNLLfZEEaZ7GE1tQGWFd/ vuJ0VX/6CCLuGoYEIqhKQSv0QdHH83f+mxvAMN2xgdWE7F2AFguDwdwtJnyNsR0X8JDS z+WCmTYvTD8gDYXBtXHR1oTBqqFV3To3eNBisobxDW07Ofnn+HtozELN5lH2atkTb/Cl wszg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=QfBasqX6; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u81-v6si10837968pfi.175.2018.10.07.23.44.22; Sun, 07 Oct 2018 23:44:37 -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=@broadcom.com header.s=google header.b=QfBasqX6; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbeJHNyS (ORCPT + 99 others); Mon, 8 Oct 2018 09:54:18 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:42651 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbeJHNyS (ORCPT ); Mon, 8 Oct 2018 09:54:18 -0400 Received: by mail-qt1-f195.google.com with SMTP id j46-v6so4189573qtc.9 for ; Sun, 07 Oct 2018 23:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wxXzZzH/WuAUz2hsKhOq6X6eSW+Olg6W4tnfFIsFAAk=; b=QfBasqX60zFNglIEO+K4fGh7HNUS4C8c/vDPPOz6PVzpKYWLkO7yck14tb347iYaE+ vR8h39giv5IVwRo2ama050liHxz1YAuZjuDNaR+hmcyBI+HkrlOXeFTrseFNq11VfigC +tnbSCEieszbHW4Qf1LN/0jI0EjWsHKnB+1O0= 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=wxXzZzH/WuAUz2hsKhOq6X6eSW+Olg6W4tnfFIsFAAk=; b=S2eXmjEe53W0lQIIaCpJaG6Ti8wXb9RvMVFdptZxCrx4dEceHN03YmteuKCN7vbQp3 O9sohjG/Q5kCmbUdBNipy09eLMI3IGzajUxxfCw0DX/jXeIfBEqiwfW+P5L7ldb+rJ2J xNTm/CaFArWpwFjTO9jBP/d6SEIcnE1DwVAgw/SBrkwGI2f77pG8yUYWBH89SSn6cGdG G3oyTqn5TQEDg7bfxRi8TiiTs2ZPR4zumRJyg0OnUWUFclWtaqxZnXsl7q/Bvl4urgmt jLlpEndPU8FfTF5qxqjWCNMUrJEz0aOzqUXY5GADEZrDWXgErO5BU9f9+Tt8CCp0DMak VGww== X-Gm-Message-State: ABuFfogcPjVhkwhMJokW57fIjF/QKH5ivoPQTf7lffMpPz07MpNtPSCy bJjV29/xUCj+XqRaSqDYoB58vM0vDobmc5rZpF0XRw== X-Received: by 2002:ac8:256e:: with SMTP id 43-v6mr18120164qtn.88.1538981047551; Sun, 07 Oct 2018 23:44:07 -0700 (PDT) MIME-Version: 1.0 References: <1537935759-14754-1-git-send-email-suganath-prabu.subramani@broadcom.com> <1537935759-14754-2-git-send-email-suganath-prabu.subramani@broadcom.com> <20180926213241.GI28024@bhelgaas-glaptop.roam.corp.google.com> <20180927070327.wvl5glb4c7gtjoa3@wunner.de> <20180927184746.GM28024@bhelgaas-glaptop.roam.corp.google.com> <20180927190959.dio4qwti3i4accjm@wunner.de> <20181001204051.GD142872@bhelgaas-glaptop.roam.corp.google.com> <20181002140443.GA120535@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20181002140443.GA120535@bhelgaas-glaptop.roam.corp.google.com> From: Suganath Prabu Subramani Date: Mon, 8 Oct 2018 12:14:40 +0530 Message-ID: Subject: Re: [PATCH v4 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available To: helgaas@kernel.org Cc: lukas@wunner.de, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org, Andy Shevchenko , Sathya Prakash , Sreekanth Reddy , linux-kernel@vger.kernel.org, benh@kernel.crashing.org, ruscur@russell.cc, sbobroff@linux.ibm.com, Oliver 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 Tue, Oct 2, 2018 at 7:34 PM Bjorn Helgaas wrote: > > On Mon, Oct 01, 2018 at 03:40:51PM -0500, Bjorn Helgaas wrote: > > I think the names "pci_device_is_present()" and > > "mpt3sas_base_pci_device_is_available()" contribute to the problem > > because they make promises that can't be kept -- all we can say is > > that the device *was* present, but we know whether it is *still* > > present. Bjorn, In the patch we are using '!' (i.e. not operation) of pci_device_is_present(), which is logically same as pci_device_is absent, and it is same for mpt3sas_base_pci_device_is_available(). My understanding is that, you want us to rename these functions for better readability Is that correct ? > Oops, I meant "we DON'T know whether it is still present." > > > I think it would be better if the interfaces were something > > like "pci_device_is_absent()" because that gives a result we can rely > > on. If that returns true, we know the device is definitely gone. > > > > Bjorn