Skip to content

arch: arm: nxp: mpu: fix constant expression result errors #13909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ioannisg
Copy link
Member

This commit fixes two Constant Expression Result errors,
in the NXP MPU driver due to incompatible integer types.

Fixes #13836.
Fixes #13865.

Signed-off-by: Ioannis Glaropoulos [email protected]

@ioannisg ioannisg added bug The issue is a bug, or the PR is fixing a bug area: ARM ARM (32-bit) Architecture labels Feb 27, 2019
@ioannisg ioannisg requested a review from galak February 27, 2019 17:49
if (_region_allocate_and_init(index,
(const struct nxp_mpu_region *)&added_sram_region)
== -EINVAL) {
return -EINVAL;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a better fix be:

	if (_region_allocate_and_init(index,
			(const struct nxp_mpu_region *)&added_sram_region)
		< 0) {
		return -EINVAL;
	}

??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's fine, i will apply this.

This commit fixes two Constant Expression Result errors,
in the NXP MPU driver due to incompatible integer types.

Fixes zephyrproject-rtos#13836.
Fixes zephyrproject-rtos#13865.

Signed-off-by: Ioannis Glaropoulos <[email protected]>
@ioannisg ioannisg force-pushed the arch_arm_nxp_mpu_coverity_issues_1 branch from 4b5b519 to 552141e Compare February 28, 2019 08:37
Copy link
Member Author

@ioannisg ioannisg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaureenHelm, updated, based on your suggestion, pls, revisit.

@ioannisg ioannisg added this to the v1.14.0 milestone Feb 28, 2019
@ioannisg ioannisg added the Coverity A Coverity detected issue or its fix label Feb 28, 2019
@codecov-io
Copy link

Codecov Report

Merging #13909 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13909      +/-   ##
==========================================
- Coverage   52.29%   52.25%   -0.04%     
==========================================
  Files         307      307              
  Lines       45429    45429              
  Branches    10506    10506              
==========================================
- Hits        23756    23740      -16     
- Misses      16887    16899      +12     
- Partials     4786     4790       +4
Impacted Files Coverage Δ
subsys/testsuite/ztest/include/ztest_assert.h 38.88% <0%> (-38.89%) ⬇️
subsys/testsuite/ztest/src/ztest.c 65.28% <0%> (-7.44%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e731bdc...552141e. Read the comment docs.

@galak galak merged commit dd4754e into zephyrproject-rtos:master Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix
Projects
None yet
5 participants