We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20e03f5 commit 646bf48Copy full SHA for 646bf48
fs/shm/shmfs_alloc.c
@@ -148,20 +148,16 @@ FAR struct shmfs_object_s *shmfs_alloc_object(size_t length)
148
149
void shmfs_free_object(FAR struct shmfs_object_s *object)
150
{
151
-#if defined(CONFIG_BUILD_KERNEL)
152
- size_t i;
153
- size_t n_pages = MM_NPAGES(object->length);
154
- FAR void **pages;
155
-#endif
156
-
157
if (object)
158
159
#if defined(CONFIG_BUILD_FLAT)
160
fs_heap_free(object->paddr);
161
#elif defined(CONFIG_BUILD_PROTECTED)
162
kumm_free(object->paddr);
163
#elif defined(CONFIG_BUILD_KERNEL)
164
- pages = &object->paddr;
+ size_t i;
+ size_t n_pages = MM_NPAGES(object->length);
+ FAR void **pages = &object->paddr;
165
for (i = 0; i < n_pages; i++)
166
167
if (pages[i])
0 commit comments