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

Storage: Add required header file and namespace element instead add all #8002

Merged
merged 1 commit into from Oct 12, 2018

Conversation

Projects
None yet
10 participants
@deepikabhavnani
Contributor

deepikabhavnani commented Sep 5, 2018

Description

Source inside mbed-os should not be using "mbed.h" even in CPP files, instead required header file and namespace should be explicitly added inside mbed-os

With #7760 PR, we will give an option to remove namespace.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

@cmonr cmonr requested review from kjbracey-arm and ARMmbed/mbed-os-storage Sep 5, 2018

@cmonr cmonr added the needs: review label Sep 5, 2018

@pan-

pan- approved these changes Sep 5, 2018

@0xc0170

0xc0170 approved these changes Sep 6, 2018

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Sep 12, 2018

@ARMmbed/mbed-os-storage - Please review

@0xc0170 0xc0170 added needs: work and removed needs: review labels Oct 1, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 1, 2018

Needs a rebase to resolve a conflict. We should be good for Ci afterwards.

@deepikabhavnani deepikabhavnani force-pushed the deepikabhavnani:storage_remove_mbed_h branch from 1b0455f to adc255f Oct 3, 2018

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Oct 3, 2018

Rebased to resolve conflicts

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Oct 5, 2018

@ARMmbed/mbed-os-storage - Please review

#include "mbed.h"
#include "platform/mbed_assert.h"
#include "ChainingBlockDevice.h"

This comment has been minimized.

@yossi2le

yossi2le Oct 7, 2018

Contributor

Why does ChainingBlockDevice.h include itself?

This comment has been minimized.

@deepikabhavnani

deepikabhavnani Oct 8, 2018

Contributor

Good catch.. 👍

@@ -36,7 +35,7 @@ ObservingBlockDevice::~ObservingBlockDevice()
// Does nothing
}
void ObservingBlockDevice::attach(Callback<void(BlockDevice *)> cb)
void ObservingBlockDevice::attach(mbed::Callback<void(BlockDevice *)> cb)

This comment has been minimized.

@yossi2le

yossi2le Oct 7, 2018

Contributor

why not adding using namespace mbed?

This comment has been minimized.

@deepikabhavnani

deepikabhavnani Oct 8, 2018

Contributor

Consistency, also after this cleanup next PR is to add all block devices and filesystem into the mbed namespace

This comment has been minimized.

@yossi2le

yossi2le Oct 8, 2018

Contributor

I can live with it. Specifically, if next PR is to bring those block devices into mbed namespace.

This comment has been minimized.

@deepikabhavnani

deepikabhavnani Oct 8, 2018

Contributor

I have that PR already in place, but cannot merge unless this cleanup is done

@yossi2le

I think in general it looks good besides 2 minor issues.

@@ -510,7 +510,7 @@ static void nvstore_multi_thread_test()
if (!threads[i]) {
goto mem_fail;
}
threads[i]->start(callback(thread_test_worker));
threads[i]->start(mbed::callback(thread_test_worker));

This comment has been minimized.

@yossi2le

yossi2le Oct 7, 2018

Contributor

Again why not just adding using namespace mbed?

This comment has been minimized.

@deepikabhavnani

This comment has been minimized.

@yossi2le

yossi2le Oct 8, 2018

Contributor

Do you intend to bring nvstore files also into mbed namespace in the next PR?

This comment has been minimized.

@deepikabhavnani

deepikabhavnani Oct 8, 2018

Contributor

Block device and file system was for sure.. NVstore will have to check with the storage and other teams

@deepikabhavnani deepikabhavnani force-pushed the deepikabhavnani:storage_remove_mbed_h branch from adc255f to 8642ece Oct 8, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 11, 2018

/moprh build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 11, 2018

Whoops.

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 11, 2018

Build : SUCCESS

Build number : 3324
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8002/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@adbridge adbridge merged commit 8dcc949 into ARMmbed:master Oct 12, 2018

15 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 652 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10185 cycles (+976 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@deepikabhavnani deepikabhavnani deleted the deepikabhavnani:storage_remove_mbed_h branch Oct 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment