Page MenuHomeFreeBSD

iwx: make compile withtout IWX_DEBUG being on
AcceptedPublic

Authored by bz on Sat, Nov 15, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 3, 5:39 PM
Unknown Object (File)
Fri, Nov 28, 2:25 PM
Unknown Object (File)
Wed, Nov 26, 1:09 AM
Unknown Object (File)
Tue, Nov 25, 6:58 PM
Unknown Object (File)
Wed, Nov 19, 5:45 PM
Unknown Object (File)
Wed, Nov 19, 5:18 PM
Unknown Object (File)
Tue, Nov 18, 10:16 PM
Unknown Object (File)
Mon, Nov 17, 8:03 PM

Details

Summary

Now that the driver compiles without IWX_DEBUG awlays enabled, someone
can consider making it a kernel option.

Fixes: 2ad0f7e91582, a615ded5bf2d

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68673
Build 65556: arc lint + arc unit

Event Timeline

bz requested review of this revision.Sat, Nov 15, 9:31 PM

This is incomplete. There is a ton of code in sys/dev/iwx/if_iwx_debug.c which will now be compiled but not used.

sys/modules/iwx/Makefile
8

I would remove this line as well

In D53776#1227867, @des wrote:

This is incomplete. There is a ton of code in sys/dev/iwx/if_iwx_debug.c which will now be compiled but not used.

That may be true but the point was "the driver does not compile without it". Now it does.

emaste added a subscriber: emaste.

The compile fixes LGTM. I'm indifferent on enabling IWX_DEBUG by default or not -- AFAIK it also has a run-time knob and has no user-facing effect unless turned on, and might be reasonable to leave compiled in given this driver's current status.

This revision is now accepted and ready to land.Sun, Nov 16, 5:32 PM

The compile fixes LGTM. I'm indifferent on enabling IWX_DEBUG by default or not -- AFAIK it also has a run-time knob and has no user-facing effect unless turned on, and might be reasonable to leave compiled in given this driver's current status.

I think @adrian or @thj will have the best idea as to that (if it makes sense and how to possibly control the debugging). I'll just wait, also in case one of them will want to address @des' comments about covering all the debug parts properly. Alternatively we could just remove all the #ifdef IWX_DEBUG and always have it avail (@thj @adrian)?

I don't mind either; in fact the above diffs just remind me i need to finish cleaning up the iwx debug printing so this stuff doesn't require #ifdef IWX_DEBUG everywhere. :-)

I'm happy with landing this and fixnig it in post.

I don't mind either; in fact the above diffs just remind me i need to finish cleaning up the iwx debug printing so this stuff doesn't require #ifdef IWX_DEBUG everywhere. :-)

I'm happy with landing this and fixnig it in post.

If you want to remove IWX_DEBUG anyway there is no point in landing this... Then the answer is to simply remove IWX_DEBUG entirely

nono i mean the places in the diff where #ifdef IWX_DEBUG instead of using IWX_DPRINTF(), and an IWX_DPRINTF_CHECK() macro ...

This is fine to me, I'm not sure what adrian means with his outstanding item, but we can just keep hitting iwx with a stick until we are happy.

Can you please put all of if_iwx_debug.c under #ifdef IWX_DEBUG? A quick LINT build should confirm that none of it is needed (and fwiw print_opcodes() appears not to be used at all, ever).

In D53776#1228267, @des wrote:

Can you please put all of if_iwx_debug.c under #ifdef IWX_DEBUG? A quick LINT build should confirm that none of it is needed (and fwiw print_opcodes() appears not to be used at all, ever).

Yes, I'll have a go at that; also given adrian's comments I'll also cleanup the Makefile line you asked.