Received: by 10.192.165.156 with SMTP id m28csp864703imm; Thu, 19 Apr 2018 08:48:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/B5oDZOlJ/O0zWk+Th+I9zOcDidIJHaHQI48fUWJvJuEZ1Ey6REXk7fV6XYqPfcwOx4oc6 X-Received: by 2002:a17:902:848e:: with SMTP id c14-v6mr6533215plo.95.1524152881683; Thu, 19 Apr 2018 08:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524152881; cv=none; d=google.com; s=arc-20160816; b=y8oxv4XiZUcryqFB1dUQDdXe2MQdOKA8fJsWH//+lwmN6s8o2H1KwIVlERnFBel3sW Z9NovCohX3RdJBfzAFLtYM/XsTGeoV0GadCtnsvNoZWbwVjnUf7xjWmPXZr+SpFiw37O 3Q/sI6qxYsUV8zXfGeqY59/2uimFZDWdSLvOmi0szPgQ6PhzifCa9j8v6DSFkKTTFuBF zWREtXaZcRrpg3DdK1YKQZMUHA26Wa1PniBo5ltsSKTv+TMpXjT64I52QuupczCHRdjX G57Vhygg0kVjacA9vbLEJO3FaVN/UgjBqkwW/ZBa8fvmXdU2t5/HzkiVKEazD8UeZ9pp 6Grg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=7dLNEJedgIaj4C77HJo7X48e8FHRJfNw1f+SEf/Uj7I=; b=DNnErIL5e7DSOXDjpbu9hQ7L45nGABdU8kBcciwgcI0YKCEaEDLMwel29oU9l+wpCu 5IxFImalaDyyR7awCNpMKtcugwOwKrWJqUWV8Y3uDhKa2Fsw7hxBMR6cEisqI7VlpSy3 502R0NBX59peZkhTLOJ7CCOCBgGXDE6iAmBC0L9YXoSWJ2Ja3RH00ckavhQnmKH7Agix hnzZaIu1Z+MftTqzaCUuR1mV/Ecmsv9HTXnoIiPGU9GdK3VYU3Jos/4hShDds8S9ONBs x1snjvtUcHgibKTX/jYwuyLoWZXChSmEPRpiqt/ZbVNdtf8UgkwHrglDfrFczY8VKT78 p4Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=utlLVSe8; 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 8si3457854pfv.115.2018.04.19.08.47.45; Thu, 19 Apr 2018 08:48:01 -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=utlLVSe8; 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 S1753336AbeDSPqT (ORCPT + 99 others); Thu, 19 Apr 2018 11:46:19 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:46167 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbeDSPqR (ORCPT ); Thu, 19 Apr 2018 11:46:17 -0400 Received: by mail-oi0-f68.google.com with SMTP id e123-v6so5262237oih.13; Thu, 19 Apr 2018 08:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7dLNEJedgIaj4C77HJo7X48e8FHRJfNw1f+SEf/Uj7I=; b=utlLVSe8hOyRdLblgZL2EHDnWiCbkYXdlBGbU3PosNSHB3lU3egFH+/7wTu3Nz98fg aux7NYaQIvJcd/t/mhLFLkEMqVwjaLf4KEAs2NrRRT0I8bC7kVd3ZB30Mj2XPsLl6vYc U14LWG8CXKwk8rGLCV0vnn4ej1Q75VATskL5mkeox9NEiGrXVKcEF3jtSBzp03Esk9IW dRWM8huCJ+mGpKPbNfj8LwQR0Vf0Vftc+Op3rGzrRQsc1s79MNekrsOCUF1iDKNVS9YR YjjIbnmOsTQZH+toc/2wcMz2hOAaVKhM1e5kuXcXYbpgTiDgyfw4WK7FKjfAw/7zrr0g PX6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7dLNEJedgIaj4C77HJo7X48e8FHRJfNw1f+SEf/Uj7I=; b=JC6wPmp7XS9dAgtba6LTH46OFAAENMZFrUh+qRNeLHpNRvakqsGlMDP2EIn8rt/kWL Qrrc0cfbGGyuUKkVGV8lmPrb7HZ+M4nD4jRJ+mi5FB5su+T8Kshzw5PpzOy4kPBMo6SS B3FHn/Zi2fBQ7MPy2NZw9kk2XJmPV4jgdW7sslk7A1KIiQrj5V/03VpQzz1BGsbHcDRQ PdVCES9WKIF6DRA0NhFn0xSxuAOfHXm/TXQ1ub86O37X1/HaZuy8jZK9dj2GXQ7Fhmeo souvVq2xHgrm5C2tzvwylkbDSKC4AZw5bt05ruW/cGOkeaIg5uq6eyMfVyZvBKco2Jiw 8UYQ== X-Gm-Message-State: ALQs6tBOzlE3IrhtdLMeG+QoONlpyPq0UcaQL1fOgHEk7kt58HjC9gG5 yRw8+vl9YphZWc8QpPmMRZY= X-Received: by 2002:aca:5cd5:: with SMTP id q204-v6mr3742833oib.162.1524152776468; Thu, 19 Apr 2018 08:46:16 -0700 (PDT) Received: from nuclearis2_1.gtech (c-98-197-2-30.hsd1.tx.comcast.net. [98.197.2.30]) by smtp.gmail.com with ESMTPSA id l24-v6sm784699oii.22.2018.04.19.08.46.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 08:46:16 -0700 (PDT) Subject: Re: [RFC PATCH v2 2/4] acpi: apei: Split GHES handlers outside of ghes_do_proc To: Borislav Petkov Cc: linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org, tony.luck@intel.com, tbaicar@codeaurora.org, will.deacon@arm.com, james.morse@arm.com, shiju.jose@huawei.com, zjzhang@codeaurora.org, gengdongjiu@huawei.com, linux-kernel@vger.kernel.org, alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, devel@acpica.org, mchehab@kernel.org, robert.moore@intel.com, erik.schmauss@intel.com References: <20180416215903.7318-1-mr.nuke.me@gmail.com> <20180416215903.7318-3-mr.nuke.me@gmail.com> <20180418175201.GI4795@pd.tnic> <5f26275c-5896-c552-69c4-78e5aaaa6558@gmail.com> <20180419143018.GC3600@pd.tnic> <8f467611-16a1-8fe7-ea12-e2e29023e4e8@gmail.com> <20180419152933.GD3600@pd.tnic> From: "Alex G." Message-ID: Date: Thu, 19 Apr 2018 10:46:15 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180419152933.GD3600@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/19/2018 10:29 AM, Borislav Petkov wrote: > On Thu, Apr 19, 2018 at 09:57:08AM -0500, Alex G. wrote: >> And that was the motivation behind my splitting it in this patch. > > By "split" I don't mean add a function pointer which gets selected and > then called - if the function becomes too long, you simply split the > function body properly. The bulk of the function is the if/else mapping from UUID to error handler. I don't see how that can be easily split up, hence why I originally resorted to the mapping. As you said, we'll keep it simple at first. >> You don't need the entire GHES structure -- wide context. Individual >> handlers should not be able to access the entire ghes. > > But you remove the @ghes argument in patch 1. So what are we even > talking about? You could say, by convention, handlers shouldn't access ghes directly, but that is not obvious when @ghes is in scope. The reason I bring it up is that, if [1/4] ends up being unneeded, then I will drop it from the series. Alex