Bug 246867

Summary: [PATCH] sys/dev/cpufreq/cpufreq_dt.c redefine DEBUG and fail kernelbuild
Product: Base System Reporter: Oskar Holmlund <oskar.holmlund>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: manu, markj, oskar.holmlund
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
cpufreq_dt.c
none
kernel conf add DEBUG to std.armv7 none

Description Oskar Holmlund 2020-05-30 11:11:47 UTC
Created attachment 215052 [details]
cpufreq_dt.c

Tested on head r361642

If DEBUG is defined in the kernel configuration for example in std.armv7 [see attached] the kernel will not build due to redefinition of DEBUG in cpufreq_dt.c.

Attach simple patch replacing DEBUG with DPRINTF.
Comment 1 Oskar Holmlund 2020-05-30 11:13:32 UTC
Created attachment 215053 [details]
kernel conf add DEBUG to std.armv7
Comment 2 Emmanuel Vadot freebsd_committer freebsd_triage 2020-05-30 11:20:44 UTC
Looks ok but can you put the patch on reviews.freebsd.org please ?
Comment 3 Oskar Holmlund 2020-05-30 11:35:03 UTC
(In reply to Emmanuel Vadot from comment #2)
Yes, i will do that.
Comment 4 Mark Johnston freebsd_committer freebsd_triage 2020-06-05 15:29:23 UTC
(In reply to Oskar Holmlund from comment #3)
Did you get a chance to do this?  Just want to make sure that the patch is not forgotten.
Comment 5 Oskar Holmlund 2020-06-05 15:35:17 UTC
(In reply to Mark Johnston from comment #4)
Thank you for asking; here it is: https://reviews.freebsd.org/D25080
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-06-09 09:43:01 UTC
A commit references this bug:

Author: manu
Date: Tue Jun  9 09:42:39 UTC 2020
New revision: 361964
URL: https://svnweb.freebsd.org/changeset/base/361964

Log:
  coufreq_dt: Rename DEBUG to DPRINTF

  DEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail the
  build of kernel.

  PR:		246867
  Submitted by:	Oskar Holmund (oskar.holmlund@ohdata.se)
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D25080

Changes:
  head/sys/dev/cpufreq/cpufreq_dt.c
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-06-19 19:33:39 UTC
A commit references this bug:

Author: manu
Date: Fri Jun 19 19:33:19 UTC 2020
New revision: 362417
URL: https://svnweb.freebsd.org/changeset/base/362417

Log:
  MFC r361964:

  coufreq_dt: Rename DEBUG to DPRINTF

  DEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail the
  build of kernel.

  PR:		246867
  Submitted by:	Oskar Holmund (oskar.holmlund@ohdata.se)
  Differential Revision:	https://reviews.freebsd.org/D25080

Changes:
_U  stable/12/
  stable/12/sys/dev/cpufreq/cpufreq_dt.c