fix: remove cal-1.0_10.RULE to prevent false positive on C calibration macros#4759
Open
dikshaa2909 wants to merge 1 commit intoaboutcode-org:developfrom
Open
fix: remove cal-1.0_10.RULE to prevent false positive on C calibration macros#4759dikshaa2909 wants to merge 1 commit intoaboutcode-org:developfrom
dikshaa2909 wants to merge 1 commit intoaboutcode-org:developfrom
Conversation
…n macros The rule matched bare CAL-1.0 (3 tokens: cal, 1, 0) which falsely detected cal-1.0 license in Linux kernel driver files containing calibration macros like BBDC_CAL (1 << 0). cal-1.0_5.RULE already correctly handles SPDX-License-Identifier: CAL-1.0. Fixes false positive in: drivers/iio/adc/ad9361.h Signed-off-by: dikshaa2909 <dikshadeware@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4740
Problem
cal-1.0_10.RULEmatched bareCAL-1.0which tokenizes to only 3 tokens(
cal,1,0). This caused false positive CAL-1.0 license detectionsin Linux kernel driver files that contain C calibration macros like:
Affected files include
drivers/iio/adc/ad9361.h,ad6676.handfrequency/ad9517.cfrom the Analog Devices Linux tree — all correctlylicensed under GPL-2.0, not CAL-1.0.
Reference: https://github.com/analogdevicesinc/linux/blob/main/drivers/iio/adc/ad9361.h
Fix
Remove
cal-1.0_10.RULEsincecal-1.0_5.RULEalready correctly handlesSPDX-License-Identifier: CAL-1.0detections. The bareCAL-1.0patternis too short (3 tokens) and ambiguous to reliably detect the license without
causing false positives in hardware/embedded code.
Verification
Before: both
gpl-2.0andcal-1.0detected inad9361.hAfter: only
gpl-2.0detectedChecklist