From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750863AbdE1RWZ (ORCPT ); Sun, 28 May 2017 13:22:25 -0400 Received: from mail.skyhub.de ([5.9.137.197]:38176 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbdE1RWY (ORCPT ); Sun, 28 May 2017 13:22:24 -0400 Date: Sun, 28 May 2017 19:22:09 +0200 From: Borislav Petkov To: Yazen Ghannam Cc: linux-edac@vger.kernel.org, Borislav Petkov , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] x86/mce/AMD: Define a list_head for threshold blocks outside the list Message-ID: <20170528172209.vgoux4bznrapiikl@pd.tnic> References: <1495658507-7413-1-git-send-email-Yazen.Ghannam@amd.com> <1495658507-7413-2-git-send-email-Yazen.Ghannam@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1495658507-7413-2-git-send-email-Yazen.Ghannam@amd.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 24, 2017 at 03:41:46PM -0500, Yazen Ghannam wrote: > From: Yazen Ghannam > > There needs to be a list_head outside of a linked list in order to iterate > over it and have access to all its elements. This is because the > list_for_each* macros iterate starting from head->next rather than head. > > Define a list_head for the threshold blocks list in struct threshold_bank struct threshold_block { ... struct list_head miscj; /* * List of threshold blocks * within a bank. */ There's your list_head right there. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [2/3] x86/mce/AMD: Define a list_head for threshold blocks outside the list From: Borislav Petkov Message-Id: <20170528172209.vgoux4bznrapiikl@pd.tnic> Date: Sun, 28 May 2017 19:22:09 +0200 To: Yazen Ghannam Cc: linux-edac@vger.kernel.org, Borislav Petkov , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org List-ID: T24gV2VkLCBNYXkgMjQsIDIwMTcgYXQgMDM6NDE6NDZQTSAtMDUwMCwgWWF6ZW4gR2hhbm5hbSB3 cm90ZToKPiBGcm9tOiBZYXplbiBHaGFubmFtIDx5YXplbi5naGFubmFtQGFtZC5jb20+Cj4gCj4g VGhlcmUgbmVlZHMgdG8gYmUgYSBsaXN0X2hlYWQgb3V0c2lkZSBvZiBhIGxpbmtlZCBsaXN0IGlu IG9yZGVyIHRvIGl0ZXJhdGUKPiBvdmVyIGl0IGFuZCBoYXZlIGFjY2VzcyB0byBhbGwgaXRzIGVs ZW1lbnRzLiBUaGlzIGlzIGJlY2F1c2UgdGhlCj4gbGlzdF9mb3JfZWFjaCogbWFjcm9zIGl0ZXJh dGUgc3RhcnRpbmcgZnJvbSBoZWFkLT5uZXh0IHJhdGhlciB0aGFuIGhlYWQuCj4gCj4gRGVmaW5l IGEgbGlzdF9oZWFkIGZvciB0aGUgdGhyZXNob2xkIGJsb2NrcyBsaXN0IGluIHN0cnVjdCB0aHJl c2hvbGRfYmFuawoKc3RydWN0IHRocmVzaG9sZF9ibG9jayB7CgoJLi4uCgogICAgICAgIHN0cnVj dCBsaXN0X2hlYWQgbWlzY2o7ICAgICAgICAgICAgICAgICAvKgogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBMaXN0IG9mIHRocmVzaG9sZCBibG9ja3MK ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogd2l0aGlu IGEgYmFuay4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICovCgpUaGVyZSdzIHlvdXIgbGlzdF9oZWFkIHJpZ2h0IHRoZXJlLgo=