Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1616026
| From | "Ghannam, Yazen" <Yazen.Ghannam@amd.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers |
| Date | 2017-04-04 15:40 +0200 |
| Message-ID | <tswQF-5tl-7@gated-at.bofh.it> (permalink) |
| References | <tpGCR-37r-3@gated-at.bofh.it> <tpGCR-37r-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message----- > From: Borislav Petkov [mailto:bp@suse.de] > Sent: Monday, March 27, 2017 1:27 PM > To: Ghannam, Yazen <Yazen.Ghannam@amd.com> ... > > static void > > -__log_error(unsigned int bank, bool deferred_err, bool threshold_err, > > u64 misc) > > +__log_error(unsigned int bank, bool deferred_err, bool use_smca_destat, > > + bool threshold_err, u64 misc) > > So I had to paste the function signature in a separate vim window and keep > looking between those arguments' names and the function calls. > > Because if I look at: > > __log_error(bank, true, false, false, 0); > > I absolutely have no clue what that code does. So we need to think of > something better. From the looks of it, I guess we dealt with a single > __log_error() function long enough. Perhaps it is time for separation: > > log_error_deferred > log_error_smca > log_error... > > and have a function __log_error() which all three call to do the work which all > three share. > > That should make the code readable again IMO. __log_error() as it is now is > hard to follow anyway. > Okay, will do. > > @@ -832,25 +823,29 @@ asmlinkage __visible void __irq_entry > smp_trace_deferred_error_interrupt(void) > > exiting_ack_irq(); > > } > > > > +static inline bool check_deferred_status(u64 status) > > This function name does not tell me anything. > > if (is_deferred_error(status)) > > tells me more. > Okay. Thanks, Yazen
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers Borislav Petkov <bp@suse.de> - 2017-03-27 19:30 +0200
RE: [PATCH 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers "Ghannam, Yazen" <Yazen.Ghannam@amd.com> - 2017-04-04 15:40 +0200
csiph-web