Re: [RFC] add BUG_ON_MAPPABLE_NULL macro

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, December 7, 2010 - 5:10 pm

On Sun,  5 Dec 2010 12:06:03 +0200
Ohad Ben-Cohen <ohad@wizery.com> wrote:


Every time someone sends me a patch with text after the "---", I decide
it was good changelog material and I promote it to above the "---". 
How's about you save us the effort :)

The changelog is a bit vague really, but the code comment explains it
all, and that's a good place to explain things.


s/drivers/code/


yup.


- arch_mmap_check() didn't have any documentation.  Please fix?

- arch_mmap_check() is a pretty poor identifier (identifiers which
  include the word "check" are usually poor ones).  Maybe
  arch_address_accessible()?

- I worry about arch_mmap_check().  Is it expected that it will
  perform a runtime check, like probe_kernel_address()?  Spell out the
  expectations, please.

- BUG_ON_MAPPABLE_NULL() will evaluate arch_mmap_check() even if
  CONFIG_BUG=n.  Seems bad, depending on what those unspelled-out
  expectations are!

- BUG_ON_MAPPABLE_NULL() is a mouthful.  I can't immedaitely think of
  anythinjg nicer :(

- Is BUG_ON_MAPPABLE_NULL() really the interface you want?  Or do we
  just want an interface which checks a pointer for nearly-nullness?


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] add BUG_ON_MAPPABLE_NULL macro, Ohad Ben-Cohen, (Sun Dec 5, 3:06 am)
Re: [RFC] add BUG_ON_MAPPABLE_NULL macro, Andrew Morton, (Tue Dec 7, 5:10 pm)
Re: [RFC] add BUG_ON_MAPPABLE_NULL macro, Ohad Ben-Cohen, (Fri Dec 10, 9:26 am)