Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1613735ybt; Thu, 2 Jul 2020 09:28:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGxUmxWHnQdcWmcguvcXcXokzigxRXokRVKbWKcEhqTRVU7cXa+arJOf2RqWYJplKqHb1t X-Received: by 2002:a17:906:970a:: with SMTP id k10mr29339875ejx.236.1593707329533; Thu, 02 Jul 2020 09:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593707329; cv=none; d=google.com; s=arc-20160816; b=lIzPgjbWX6GcQmVcTfnBwxp43VRHmpnagOzQXCFRNsgQSd9ZRcpJqNz8I73+T7jMVN 0X94TtUgpkKck83H3Mlv7rCU1eHP3wKX+XB/7fcBzQefliReqpzD/FL71+14f9ZC4xgw 3JGirTtPIWuRrCGqgVNezZg/JXHhf23qhG92+2w6vIGqIGYSIuxrcVZJAdO+pKx+uVOZ X5pvPuYbVOf1GPLshKL08jgQ0xg/ka1BCDqiU5CCOls7vIlaZL06NneEwesbylcqrBvL 8l2iqUPnHMJblCQ2vqg6efW3OAN6/zFXID78PZUOiBCrYDneLGPfuDDMjrjtdLtdVEDc FdkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BKGyNwdE3y4ef1pbkDUWx2wEahUUqC/tey8vsP66t3k=; b=VHtYOPpImTUOxsYxE26RiVtZL80isEMvYzqAbYl/Zch0qzTm5KrYR7mKi2qxi10Ozp eyX9UYHBiRbgDceOy8y2nu60PBb85uLau9QX0dJQShEyVKOtGxCAMyYfdCqpnDMd+cVC 3ceWiMQgsii2qeMhIk6v+0HxVndb1nKaQ/7NvCtI4vbSktB/f1clRpUfhPSiYVB0zc5F u+6KGP4xGFFw8nsKqabX5b0NgwTdWE7Ke2wchT/3ME5cBRIfMw1Rw/4iYZskJjEq/9mZ jeWaYCLOiLC2qdxtrp/4mePXRdiGFK92w0WZbe7DD1czy5pcsmxtQfslgNus+O201und G33g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oXmeu34t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id co19si6097528edb.605.2020.07.02.09.28.26; Thu, 02 Jul 2020 09:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oXmeu34t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726415AbgGBQ2E (ORCPT + 99 others); Thu, 2 Jul 2020 12:28:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbgGBQ17 (ORCPT ); Thu, 2 Jul 2020 12:27:59 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 284DDC08C5C1; Thu, 2 Jul 2020 09:27:59 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id n26so16546343ejx.0; Thu, 02 Jul 2020 09:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BKGyNwdE3y4ef1pbkDUWx2wEahUUqC/tey8vsP66t3k=; b=oXmeu34tul/Eh7uALk3qd8uoJLsyESkwDkrlTEhQDnvTGG809iGcWCvYZ2j+ILjUqn JqZrk62Ibi+SpIVMkR6J1oI4k1WXEwAxiJ6+9Yb0+GlECA4h5/ZKb4EaSMfLyTQZ4uuC 8WBb4havLLiRJbCifA811Zvi3+Mf4uOkrRpcyJbA0vfcDxOS7DhRT7QWbmNoIHPatlY5 3VgNFME8sgYVSRnaAyloi6snVT/coZIQ7ijlbZ+dL3HN2g9q4BfQiIJREVknD3Dh35/d 8YclbBRtRktjzIW3H1Cs690UjsUJ8VrgEeNmFu6PZOfq5M1tAuiVbiHsKhd9qd//6B+u eIBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BKGyNwdE3y4ef1pbkDUWx2wEahUUqC/tey8vsP66t3k=; b=F9Z7tmYpQ+orsW2hDDh6DgPKYlDl8fP5baXcZbhDmn3ssXp3V/TOhRjHONogh7WI1z G/vNu355G3BDGk79bhUPqm+sENsu/R+/I++2DWQHWAhpKBrWn9h4fpyfhU9iIQWBT+/2 HcBBxpI7z8FN92/5UeNlE6xiOc/Whvtvbmm8llryRtdiif/vpun5f3+U0F5tO7WFIvg/ IVV2JrtsSgjFejvQy9bTa4H3crsf7Gg5kql7PwAlDIzxx08EQbALH8zVUyIKrYl4YEAi Msq6RyrDHna5kl4VtT66qbjbDAySuKbNGj3TOiMZNlkWqRhakH8jntkP65Dwia2IKmYb d8dw== X-Gm-Message-State: AOAM533q+sfweLehP3M52n57Vh4NXY9sIFH8sE6H+v/ii1T9J90D1Exi PgE+e2VVxlv4O7p+XPRmjG4= X-Received: by 2002:a17:906:57da:: with SMTP id u26mr29223325ejr.157.1593707277882; Thu, 02 Jul 2020 09:27:57 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:b7f9:7600:4932:71ef:3c73:a14f]) by smtp.gmail.com with ESMTPSA id gu15sm7375188ejb.111.2020.07.02.09.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 09:27:57 -0700 (PDT) From: Luc Van Oostenryck To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Luc Van Oostenryck Subject: [PATCH v2 3/3] pci: update to doc to use 'pci_channel_state_t' Date: Thu, 2 Jul 2020 18:26:51 +0200 Message-Id: <20200702162651.49526-4-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200702162651.49526-1-luc.vanoostenryck@gmail.com> References: <20200702162651.49526-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The type used to describe the PCI channel state is a combination of a bitwise typedef 'pci_channel_state_t' and an enumeration of constant __force casted to this typedef: enum pci_channel_state. It's a bit complex and quite ugly because: * in C enums are weakly typed (they're essentially the same as 'int') * sparse only allow to define bitwise ints, not bitwise enums. But the idea is clearly to enforce typechecking and thus to use 'pci_channel_state_t' everywhere. So, update the documentation to use 'pci_chanell_state_t' and hide 'enum pci_channel_state' by showing a simplified but somehow equivalent definition: typedef enum { ... } pci_channel_state_t; which makes abstraction of the '__bitwise' which would otherwise just bring unneeded complications here. Signed-off-by: Luc Van Oostenryck --- Documentation/PCI/pci-error-recovery.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/PCI/pci-error-recovery.rst b/Documentation/PCI/pci-error-recovery.rst index c055deec8c56..ccd713423133 100644 --- a/Documentation/PCI/pci-error-recovery.rst +++ b/Documentation/PCI/pci-error-recovery.rst @@ -87,11 +87,11 @@ This structure has the form:: The possible channel states are:: - enum pci_channel_state { + typedef enum { pci_channel_io_normal, /* I/O channel is in normal state */ pci_channel_io_frozen, /* I/O to channel is blocked */ pci_channel_io_perm_failure, /* PCI card is dead */ - }; + } pci_channel_state_t; Possible return values are:: -- 2.27.0