From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933419AbdBPSAq (ORCPT ); Thu, 16 Feb 2017 13:00:46 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:53446 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933076AbdBPSAn (ORCPT ); Thu, 16 Feb 2017 13:00:43 -0500 Date: Thu, 16 Feb 2017 19:00:28 +0100 (CET) From: Thomas Gleixner To: Andrew Banman cc: mingo@redhat.com, akpm@linux-foundation.org, hpa@zytor.com, mike.travis@hpe.com, rja@hpe.com, sivanich@hpe.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] x86/platform/uv/BAU: Declare bau_operations struct after other BAU structs In-Reply-To: <1487123931-56809-2-git-send-email-abanman@hpe.com> Message-ID: References: <1487123931-56809-1-git-send-email-abanman@hpe.com> <1487123931-56809-2-git-send-email-abanman@hpe.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Feb 2017, Andrew Banman wrote: > We must declare bau_operations after the other BAU structs so that we may > reference them in the bau_operations function declarations. This changelog is misleading. I really had to look twice to figure out that this is just a preparatory patch for adding stuff which references a bau struct later. There is no 'MUST declare after'. You always can forward declare structs when you only use a pointer in the struct op declaration. Sure you can avoid it, but then please tell so, e.g.: Move the bau_operations declaration after bau struct declaration so the bau structs can be referenced when adding new functions to bau_operations. That way we avoid forward declarations of the bau structs. Hmm? > > +/* Abstracted BAU functions */ > +struct bau_operations { > + unsigned long (*read_l_sw_ack)(void); > + unsigned long (*read_g_sw_ack)(int pnode); > + unsigned long (*bau_gpa_to_offset)(unsigned long vaddr); > + void (*write_l_sw_ack)(unsigned long mmr); > + void (*write_g_sw_ack)(int pnode, unsigned long mmr); > + void (*write_payload_first)(int pnode, unsigned long mmr); > + void (*write_payload_last)(int pnode, unsigned long mmr); I appreciate that you made them tabular aligned! Thanks, tglx