Skip to content
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

Minor optimisation to mcr20a-rf-driver code #12427

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

DavidLin1577
Copy link
Contributor

@DavidLin1577 DavidLin1577 commented Feb 13, 2020

Summary of changes

This is a minor optimisation to the mcr20a-rf-driver code:

Note that function parameter is pointer. The code is more readable when 'NULL' instead of using '0'.

Impact of changes

Migration actions required

Documentation


Pull request type

[*] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[*] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


This is a minor optimisation to the mcr20a-rf-driver code:
1. The function parameter is 'uint8_t *byteArray',  (byteArray == NULL) instead of using (byteArray == 0). The code is more readable.
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 17, 2020

@artokin Isn't this code coming from upstream repo, therefore should be fixed there first?

@artokin
Copy link
Contributor

artokin commented Feb 18, 2020

@0xc0170 we can backport these changes there to keep repositories in sync.
cc: @JarkkoPaso

0xc0170
0xc0170 previously approved these changes Feb 18, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 18, 2020

CI started

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 18, 2020

@DavidLin1577 please include a header file for NULL declaration, see Travis errors

./components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c:409:44: error: 'NULL' undeclared (first use in this function)
     if ((numOfBytes == 0) || (byteArray == NULL)) {

@mbed-ci
Copy link

mbed-ci commented Feb 18, 2020

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM

This is a minor optimisation to the mcr20a-rf-driver code:

Note that function parameter is pointer. The code is more readable when 'NULL' instead of using '0'.
@mergify mergify bot dismissed 0xc0170’s stale review February 18, 2020 12:00

Pull request has been modified.

@DavidLin1577
Copy link
Contributor Author

@DavidLin1577 please include a header file for NULL declaration, see Travis errors

./components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c:409:44: error: 'NULL' undeclared (first use in this function)
     if ((numOfBytes == 0) || (byteArray == NULL)) {

@0xc0170 thank you so much. I had changed it as your suggestion.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 18, 2020

Ci started

@mbed-ci
Copy link

mbed-ci commented Feb 18, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 merged commit 4ce2526 into ARMmbed:master Feb 19, 2020
@mergify mergify bot removed the ready for merge label Feb 19, 2020
@DavidLin1577 DavidLin1577 deleted the patch-1 branch March 6, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants