Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2539749ybd; Mon, 24 Jun 2019 08:09:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy20VkiUEXt0A/Z/YxwmyfVSzybHt39CccxnA8SOZKy9wHvxJK6eZZOgvwbsOOSwbwy3w34 X-Received: by 2002:a63:fb4b:: with SMTP id w11mr33161522pgj.415.1561388988288; Mon, 24 Jun 2019 08:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561388988; cv=none; d=google.com; s=arc-20160816; b=Gk0FjZh1ZXV2po89h4GWI6YcC3veCd4Caz4GnmBwLpP2L17wdFYMmXOFXKRdZSciQ1 WzFhFeSnpWKxqu5R23f5nxG703BXIJQsdFQyYnB/I+qtR9lA4jrcEgV5j6RJxkH3jal/ oGNNrSnCqk5xnQGl9EuAcX6p1O584lRcIKLLATLQqEqVGi2r+QYajhruCEhyWlZrQHZo nFvpCS6KqAbavDqmLk8H+GQtG/YpuZeUIdDzyArCPh7QU1wxs5vpeIADKG6BuWhuEbwR eLOTr/pUXzlcB9siI41syO08+GmOa7RfqvOFn5mGFT2rgLq0cV7ncFB4+RPOICZf/wlm cl6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=BUZsqVL7YZsjTmOqbkH+7mTjGbV1gGSnUZ5iMdLGsmY=; b=bayx3rXFoweGcTQLfyWEXJf3ONE/yN8A0A+72qI7a1TsUxmMjvDp2ashJVZ+Hvjwl1 p/hlhZq2y7khbzXE0uGo+DeOd4hOdnQXopzkHYvEZEhDYhH51E9Lb0c+K4h6ObMDskov AEbygjkD194NyF7XufoIy/nPH99Q08ykIx1JzOK5yAd94jmxy9Q6oXygShTebQp3tz8N MNOBtCWMKvp4xZ4UMIR53dZO20O4vCWcCDD1QscKmbD3nlR4wPedZ3vM433uyAREkc6X qABAiJWFMBVVxD3bLo9rOTs8gHNbv4Te76hU1R8ZRWwnKcT80TjCrMqLm83lhd98cm+D zj4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0818 header.b=DHA0uNid; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b=chrxlK5L; 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=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si9728215pgp.245.2019.06.24.08.09.32; Mon, 24 Jun 2019 08:09:48 -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=@marvell.com header.s=pfpt0818 header.b=DHA0uNid; dkim=pass header.i=@marvell.onmicrosoft.com header.s=selector2-marvell-onmicrosoft-com header.b=chrxlK5L; 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=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730330AbfFXPJS (ORCPT + 99 others); Mon, 24 Jun 2019 11:09:18 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:57022 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730476AbfFXPJP (ORCPT ); Mon, 24 Jun 2019 11:09:15 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5OF8FJZ025903; Mon, 24 Jun 2019 08:09:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=BUZsqVL7YZsjTmOqbkH+7mTjGbV1gGSnUZ5iMdLGsmY=; b=DHA0uNidijE/Q4QvReEc4LICWqIEU5u0WR3Slx/VYMDmmuQrW8HAY6JN7dFAlP8c0d66 y3pooha4hVhkt8cdqr5YGBNWtgg8KlIMJiLfx86PesaPUDALpas10zitzunZd0DNjhGF Pn17B6hvGBrdxj8oW8grrN3y/2MvS5wpyM6nbfMRJ1Y4Nl+ZMv7KV6UUtNWYUoaqe0Im ypHLFiLbFtrMNGo+CkA3S8yiSuVfLnfgf0rcFWWmi/IWRXGuxSXggMynviR4jfJ5P59u pBE0kM9EVVaSLPiU/8XmTRGYM1jpSboPxy+jYStEMdFMZhjuRaiJdu188DRO42P+1f3H lg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2t9kujf7rg-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2019 08:09:08 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 24 Jun 2019 08:09:04 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.59) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 24 Jun 2019 08:09:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BUZsqVL7YZsjTmOqbkH+7mTjGbV1gGSnUZ5iMdLGsmY=; b=chrxlK5LaJuq6QzsKUybN+r4TVKtvfCrqm7UCn9kWLsgESSU9NIC4Ch1zGH9JnxlQoisPYKRI5lO4J4cPZ/NLuXIgcxj2mS+RBBXC3yrhPGVqql+uUvgz6OaT6GnTFMzyxlm8AmyaKZP0ypXeMPh1BaExmgfSe94+yTA+BTAb7c= Received: from MN2PR18MB3408.namprd18.prod.outlook.com (10.255.238.217) by MN2PR18MB3197.namprd18.prod.outlook.com (10.255.236.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.13; Mon, 24 Jun 2019 15:09:02 +0000 Received: from MN2PR18MB3408.namprd18.prod.outlook.com ([fe80::d3:794c:1b94:cf3]) by MN2PR18MB3408.namprd18.prod.outlook.com ([fe80::d3:794c:1b94:cf3%4]) with mapi id 15.20.2008.014; Mon, 24 Jun 2019 15:09:02 +0000 From: Robert Richter To: Borislav Petkov , James Morse , "Mauro Carvalho Chehab" CC: "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Robert Richter Subject: [PATCH v2 05/24] EDAC, mc: Fix and improve sysfs init functions Thread-Topic: [PATCH v2 05/24] EDAC, mc: Fix and improve sysfs init functions Thread-Index: AQHVKp7CWIyiXnaYckSK7vYUHbfuPA== Date: Mon, 24 Jun 2019 15:09:02 +0000 Message-ID: <20190624150758.6695-6-rrichter@marvell.com> References: <20190624150758.6695-1-rrichter@marvell.com> In-Reply-To: <20190624150758.6695-1-rrichter@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1P190CA0035.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::24) To MN2PR18MB3408.namprd18.prod.outlook.com (2603:10b6:208:16c::25) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [92.254.182.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7701ef64-9742-4f17-b37a-08d6f8b5e477 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:MN2PR18MB3197; x-ms-traffictypediagnostic: MN2PR18MB3197: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:348; x-forefront-prvs: 007814487B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(136003)(396003)(346002)(376002)(199004)(189003)(36756003)(110136005)(107886003)(54906003)(81156014)(81166006)(68736007)(8676002)(25786009)(5660300002)(8936002)(305945005)(7736002)(4326008)(1076003)(186003)(6116002)(14454004)(476003)(486006)(2616005)(11346002)(256004)(14444005)(446003)(3846002)(50226002)(26005)(2906002)(52116002)(76176011)(71200400001)(71190400001)(99286004)(386003)(6506007)(102836004)(478600001)(316002)(86362001)(6512007)(66066001)(53936002)(6486002)(73956011)(66946007)(66476007)(66556008)(64756008)(66446008)(6436002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR18MB3197;H:MN2PR18MB3408.namprd18.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8ZwaLMFdgAPeIdsZnmM+i1tKscNEv2hEJXchtB/8cxnpNgDuMAi4N3RQ4Hyb+dHo2m5GHNwaa5M8mWU05j4ke5sXByS2GL2Cia49opNIVN+GuC5ZwWZOS1L8I+t6vJqeB4G1806dpk5a6Aksg5+IOG5AxNcOk2LtCTtZDz628NsZsP/tBmlQmPztAl6vZZQntixdOQE1Nj28zDGS1FaiMlaEvoSk9gILCtoAbJxwV65Rzll8N54wE1oyF7NyDSTqFHQo5Uh2k8kt1VEv7TipdOQXOF1s/OOpVQ+7Eh9KyRWwUSP4prlGQBLc72FrIY53Dq/safhN2vj+ewduIrwAO1wZU4vWKY/oFz/Kb7QUpK2FvsFC678rC4pgLZINVK0KZ9rvz7ZtBl+u/sMxcK4J72Yvuq7/2Rg31VpP8f4nQ7A= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7701ef64-9742-4f17-b37a-08d6f8b5e477 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2019 15:09:02.8121 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rrichter@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3197 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-24_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org UmVtb3ZlIGdvdG9zIGFzIHRoZXkganVzdCBjcmVhdGUgb3ZlcmhlYWQuIEFsc28sIGZpeCBkZWJ1 ZyBtZXNzYWdlIGZvcg0KdGhlIGNhc2UgZWRhY19jcmVhdGVfZGltbV9vYmplY3QoKSBpcyBmYWls aW5nLg0KDQpTaWduZWQtb2ZmLWJ5OiBSb2JlcnQgUmljaHRlciA8cnJpY2h0ZXJAbWFydmVsbC5j b20+DQotLS0NCiBkcml2ZXJzL2VkYWMvZWRhY19tY19zeXNmcy5jIHwgMjUgKysrKysrKysrLS0t LS0tLS0tLS0tLS0tLQ0KIDEgZmlsZSBjaGFuZ2VkLCA5IGluc2VydGlvbnMoKyksIDE2IGRlbGV0 aW9ucygtKQ0KDQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9lZGFjL2VkYWNfbWNfc3lzZnMuYyBiL2Ry aXZlcnMvZ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