<div dir="ltr">This looks ok to me. Similar naming change.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 4, 2024 at 12:34 PM <<a href="mailto:berndmoessner80@gmail.com">berndmoessner80@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Bernd Moessner <<a href="mailto:berndmoessner80@gmail.com" target="_blank">berndmoessner80@gmail.com</a>><br>
<br>
---<br>
cpukit/dev/flash/flashdev.c | 72 +++++++++----------<br>
cpukit/include/dev/flash/flashdev.h | 12 ++--<br>
.../libtests/flashdev01/test_flashdev.c | 36 +++++-----<br>
3 files changed, 60 insertions(+), 60 deletions(-)<br>
<br>
diff --git a/cpukit/dev/flash/flashdev.c b/cpukit/dev/flash/flashdev.c<br>
index 40666290e0..27edead968 100644<br>
--- a/cpukit/dev/flash/flashdev.c<br>
+++ b/cpukit/dev/flash/flashdev.c<br>
@@ -99,31 +99,31 @@ static int rtems_flashdev_ioctl_clear_region(<br>
rtems_libio_t *iop<br>
);<br>
<br>
-static uint32_t rtems_flashdev_ioctl_jedec_id(<br>
+static uint32_t rtems_flashdev_ioctl_get_jedec_id(<br>
rtems_flashdev *flash<br>
);<br>
<br>
-static uint32_t rtems_flashdev_ioctl_flash_type(<br>
+static uint32_t rtems_flashdev_ioctl_get_flash_type(<br>
rtems_flashdev *flash,<br>
void *arg<br>
);<br>
<br>
-static int rtems_flashdev_ioctl_pageinfo_offset(<br>
+static int rtems_flashdev_ioctl_get_pageinfo_offset(<br>
rtems_flashdev *flash,<br>
void *arg<br>
);<br>
<br>
-static int rtems_flashdev_ioctl_pageinfo_index(<br>
+static int rtems_flashdev_ioctl_get_pageinfo_index(<br>
rtems_flashdev *flash,<br>
void *arg<br>
);<br>
<br>
-static int rtems_flashdev_ioctl_page_count(<br>
+static int rtems_flashdev_ioctl_get_page_count(<br>
rtems_flashdev *flash,<br>
void *arg<br>
);<br>
<br>
-static int rtems_flashdev_ioctl_write_block_size(<br>
+static int rtems_flashdev_ioctl_get_write_block_size(<br>
rtems_flashdev *flash,<br>
void *arg<br>
);<br>
@@ -363,7 +363,7 @@ static int rtems_flashdev_ioctl(<br>
err = 0;<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_GET_JEDEC_ID:<br>
- *( (uint32_t *) arg ) = rtems_flashdev_ioctl_jedec_id( flash );<br>
+ *( (uint32_t *) arg ) = rtems_flashdev_ioctl_get_jedec_id( flash );<br>
err = 0;<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_ERASE:<br>
@@ -376,19 +376,19 @@ static int rtems_flashdev_ioctl(<br>
err = rtems_flashdev_ioctl_clear_region( flash, iop );<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_GET_TYPE:<br>
- err = rtems_flashdev_ioctl_flash_type( flash, arg );<br>
+ err = rtems_flashdev_ioctl_get_flash_type( flash, arg );<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_GET_PAGEINFO_BY_OFFSET:<br>
- err = rtems_flashdev_ioctl_pageinfo_offset( flash, arg );<br>
+ err = rtems_flashdev_ioctl_get_pageinfo_offset( flash, arg );<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_GET_PAGEINFO_BY_INDEX:<br>
- err = rtems_flashdev_ioctl_pageinfo_index( flash, arg );<br>
+ err = rtems_flashdev_ioctl_get_pageinfo_index( flash, arg );<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_GET_PAGE_COUNT:<br>
- err = rtems_flashdev_ioctl_page_count( flash, arg );<br>
+ err = rtems_flashdev_ioctl_get_page_count( flash, arg );<br>
break;<br>
case RTEMS_FLASHDEV_IOCTL_GET_WRITE_BLOCK_SIZE:<br>
- err = rtems_flashdev_ioctl_write_block_size( flash, arg );<br>
+ err = rtems_flashdev_ioctl_get_write_block_size( flash, arg );<br>
break;<br>
}<br>
<br>
@@ -493,12 +493,12 @@ static int rtems_flashdev_do_init(<br>
flash->read = NULL;<br>
flash->write = NULL;<br>
flash->erase = NULL;<br>
- flash->jedec_id = NULL;<br>
- flash->flash_type = NULL;<br>
- flash->page_info_by_offset = NULL;<br>
- flash->page_info_by_index = NULL;<br>
- flash->page_count = NULL;<br>
- flash->write_block_size = NULL;<br>
+ flash->get_jedec_id = NULL;<br>
+ flash->get_flash_type = NULL;<br>
+ flash->get_page_info_by_offset = NULL;<br>
+ flash->get_page_info_by_index = NULL;<br>
+ flash->get_page_count = NULL;<br>
+ flash->get_write_block_size = NULL;<br>
flash->region_table = NULL;<br>
return 0;<br>
}<br>
@@ -768,29 +768,29 @@ static size_t rtems_flashdev_get_region_size(<br>
return table->regions[ rtems_flashdev_get_region_index( iop ) ].size;<br>
}<br>
<br>
-static uint32_t rtems_flashdev_ioctl_jedec_id( rtems_flashdev *flash )<br>
+static uint32_t rtems_flashdev_ioctl_get_jedec_id( rtems_flashdev *flash )<br>
{<br>
- if ( flash->jedec_id == NULL ) {<br>
+ if ( flash->get_jedec_id == NULL ) {<br>
return 0;<br>
} else {<br>
- return ( *flash->jedec_id )( flash );<br>
+ return ( *flash->get_jedec_id )( flash );<br>
}<br>
}<br>
<br>
-static uint32_t rtems_flashdev_ioctl_flash_type(<br>
+static uint32_t rtems_flashdev_ioctl_get_flash_type(<br>
rtems_flashdev *flash,<br>
void *arg<br>
)<br>
{<br>
rtems_flashdev_flash_type *type = (rtems_flashdev_flash_type*)arg;<br>
- if ( flash->flash_type == NULL ) {<br>
+ if ( flash->get_flash_type == NULL ) {<br>
return 0;<br>
} else {<br>
- return ( *flash->flash_type )( flash, type );<br>
+ return ( *flash->get_flash_type )( flash, type );<br>
}<br>
}<br>
<br>
-static int rtems_flashdev_ioctl_pageinfo_offset(<br>
+static int rtems_flashdev_ioctl_get_pageinfo_offset(<br>
rtems_flashdev *flash,<br>
void *arg<br>
)<br>
@@ -800,18 +800,18 @@ static int rtems_flashdev_ioctl_pageinfo_offset(<br>
if ( arg == NULL ) {<br>
rtems_set_errno_and_return_minus_one( EINVAL );<br>
}<br>
- if ( flash->page_info_by_offset == NULL ) {<br>
+ if ( flash->get_page_info_by_offset == NULL ) {<br>
return 0;<br>
} else {<br>
page_info = (rtems_flashdev_ioctl_page_info *) arg;<br>
- return ( *flash->page_info_by_offset )( flash,<br>
+ return ( *flash->get_page_info_by_offset )( flash,<br>
page_info->location,<br>
&page_info->page_info.offset,<br>
&page_info->page_info.size );<br>
}<br>
}<br>
<br>
-static int rtems_flashdev_ioctl_pageinfo_index( rtems_flashdev *flash,<br>
+static int rtems_flashdev_ioctl_get_pageinfo_index( rtems_flashdev *flash,<br>
void *arg )<br>
{<br>
rtems_flashdev_ioctl_page_info *page_info;<br>
@@ -819,30 +819,30 @@ static int rtems_flashdev_ioctl_pageinfo_index( rtems_flashdev *flash,<br>
if ( arg == NULL ) {<br>
rtems_set_errno_and_return_minus_one( EINVAL );<br>
}<br>
- if ( flash->page_info_by_index == NULL ) {<br>
+ if ( flash->get_page_info_by_index == NULL ) {<br>
return 0;<br>
} else {<br>
page_info = (rtems_flashdev_ioctl_page_info *) arg;<br>
- return ( *flash->page_info_by_index )( flash,<br>
+ return ( *flash->get_page_info_by_index )( flash,<br>
page_info->location,<br>
&page_info->page_info.offset,<br>
&page_info->page_info.size );<br>
}<br>
}<br>
<br>
-static int rtems_flashdev_ioctl_page_count( rtems_flashdev *flash, void *arg )<br>
+static int rtems_flashdev_ioctl_get_page_count( rtems_flashdev *flash, void *arg )<br>
{<br>
if ( arg == NULL ) {<br>
rtems_set_errno_and_return_minus_one( EINVAL );<br>
}<br>
- if ( flash->page_count == NULL ) {<br>
+ if ( flash->get_page_count == NULL ) {<br>
return 0;<br>
} else {<br>
- return ( *flash->page_count )( flash, ( (int *) arg ) );<br>
+ return ( *flash->get_page_count )( flash, ( (int *) arg ) );<br>
}<br>
}<br>
<br>
-static int rtems_flashdev_ioctl_write_block_size(<br>
+static int rtems_flashdev_ioctl_get_write_block_size(<br>
rtems_flashdev *flash,<br>
void *arg<br>
)<br>
@@ -850,10 +850,10 @@ static int rtems_flashdev_ioctl_write_block_size(<br>
if ( arg == NULL ) {<br>
rtems_set_errno_and_return_minus_one( EINVAL );<br>
}<br>
- if ( flash->write_block_size == NULL ) {<br>
+ if ( flash->get_write_block_size == NULL ) {<br>
return 0;<br>
} else {<br>
- return ( *flash->write_block_size )( flash, ( (size_t *) arg ) );<br>
+ return ( *flash->get_write_block_size )( flash, ( (size_t *) arg ) );<br>
}<br>
}<br>
<br>
diff --git a/cpukit/include/dev/flash/flashdev.h b/cpukit/include/dev/flash/flashdev.h<br>
index 59028a8cba..6244d38e3a 100644<br>
--- a/cpukit/include/dev/flash/flashdev.h<br>
+++ b/cpukit/include/dev/flash/flashdev.h<br>
@@ -279,7 +279,7 @@ struct rtems_flashdev {<br>
*<br>
* @retval JEDEC ID.<br>
*/<br>
- uint32_t ( *jedec_id )(<br>
+ uint32_t ( *get_jedec_id )(<br>
rtems_flashdev *flash<br>
);<br>
<br>
@@ -292,7 +292,7 @@ struct rtems_flashdev {<br>
* @retval 0 Success<br>
* @retbal Other Failure<br>
*/<br>
- int ( *flash_type )(<br>
+ int ( *get_flash_type )(<br>
rtems_flashdev *flash,<br>
rtems_flashdev_flash_type *type<br>
);<br>
@@ -310,7 +310,7 @@ struct rtems_flashdev {<br>
* @retval 0 Success.<br>
* @retval non-zero Failed.<br>
*/<br>
- int ( *page_info_by_offset )(<br>
+ int ( *get_page_info_by_offset )(<br>
rtems_flashdev *flash,<br>
off_t search_offset,<br>
off_t *page_offset,<br>
@@ -329,7 +329,7 @@ struct rtems_flashdev {<br>
* @retval 0 Success.<br>
* @retval non-zero Failed.<br>
*/<br>
- int ( *page_info_by_index )(<br>
+ int ( *get_page_info_by_index )(<br>
rtems_flashdev *flashdev,<br>
off_t search_index,<br>
off_t *page_offset,<br>
@@ -345,7 +345,7 @@ struct rtems_flashdev {<br>
* @retval 0 Success.<br>
* @retval non-zero Failed.<br>
*/<br>
- int ( *page_count )(<br>
+ int ( *get_page_count )(<br>
rtems_flashdev *flashdev,<br>
int *page_count<br>
);<br>
@@ -359,7 +359,7 @@ struct rtems_flashdev {<br>
* @retval 0 Success.<br>
* @retval non-zero Failed.<br>
*/<br>
- int ( *write_block_size )(<br>
+ int ( *get_write_block_size )(<br>
rtems_flashdev *flashdev,<br>
size_t *write_block_size<br>
);<br>
diff --git a/testsuites/libtests/flashdev01/test_flashdev.c b/testsuites/libtests/flashdev01/test_flashdev.c<br>
index 708d708977..d97f5d8145 100644<br>
--- a/testsuites/libtests/flashdev01/test_flashdev.c<br>
+++ b/testsuites/libtests/flashdev01/test_flashdev.c<br>
@@ -49,35 +49,35 @@ typedef struct test_flashdev {<br>
rtems_flashdev_region regions[MAX_NUM_REGIONS];<br>
} test_flashdev;<br>
<br>
-int test_flashdev_page_by_off(<br>
+int test_flashdev_get_page_by_off(<br>
rtems_flashdev *flash,<br>
off_t search_offset,<br>
off_t *page_offset,<br>
size_t *page_size<br>
);<br>
<br>
-int test_flashdev_page_by_index(<br>
+int test_flashdev_get_page_by_index(<br>
rtems_flashdev *flash,<br>
off_t search_index,<br>
off_t *page_offset,<br>
size_t *page_size<br>
);<br>
<br>
-int test_flashdev_page_count(<br>
+int test_flashdev_get_page_count(<br>
rtems_flashdev *flash,<br>
int *page_count<br>
);<br>
<br>
-int test_flashdev_wb_size(<br>
+int test_flashdev_get_wb_size(<br>
rtems_flashdev *flash,<br>
size_t *write_block_size<br>
);<br>
<br>
-uint32_t test_flashdev_jedec_id(<br>
+uint32_t test_flashdev_get_jedec_id(<br>
rtems_flashdev* flash<br>
);<br>
<br>
-int test_flashdev_type(<br>
+int test_flashdev_get_type(<br>
rtems_flashdev* flash,<br>
rtems_flashdev_flash_type* type<br>
);<br>
@@ -103,7 +103,7 @@ int test_flashdev_erase(<br>
);<br>
<br>
/* Find page info by offset handler */<br>
-int test_flashdev_page_by_off(<br>
+int test_flashdev_get_page_by_off(<br>
rtems_flashdev *flash,<br>
off_t search_offset,<br>
off_t *page_offset,<br>
@@ -116,7 +116,7 @@ int test_flashdev_page_by_off(<br>
}<br>
<br>
/* Find page by index handler */<br>
-int test_flashdev_page_by_index(<br>
+int test_flashdev_get_page_by_index(<br>
rtems_flashdev *flash,<br>
off_t search_index,<br>
off_t *page_offset,<br>
@@ -129,7 +129,7 @@ int test_flashdev_page_by_index(<br>
}<br>
<br>
/* Page count handler */<br>
-int test_flashdev_page_count(<br>
+int test_flashdev_get_page_count(<br>
rtems_flashdev *flash,<br>
int *page_count<br>
)<br>
@@ -139,7 +139,7 @@ int test_flashdev_page_count(<br>
}<br>
<br>
/* Write block size handler */<br>
-int test_flashdev_wb_size(<br>
+int test_flashdev_get_wb_size(<br>
rtems_flashdev *flash,<br>
size_t *write_block_size<br>
)<br>
@@ -151,7 +151,7 @@ int test_flashdev_wb_size(<br>
/* JEDEC ID handler, this would normally require a READID<br>
* call to the physical flash device.<br>
*/<br>
-uint32_t test_flashdev_jedec_id(<br>
+uint32_t test_flashdev_get_jedec_id(<br>
rtems_flashdev* flash<br>
)<br>
{<br>
@@ -160,7 +160,7 @@ uint32_t test_flashdev_jedec_id(<br>
}<br>
<br>
/* Function to identify what kind of flash is attached. */<br>
-int test_flashdev_type(<br>
+int test_flashdev_get_type(<br>
rtems_flashdev *flash,<br>
rtems_flashdev_flash_type *type<br>
)<br>
@@ -263,12 +263,12 @@ rtems_flashdev* test_flashdev_init(void)<br>
flash->read = &test_flashdev_read;<br>
flash->write = &test_flashdev_write;<br>
flash->erase = &test_flashdev_erase;<br>
- flash->jedec_id = &test_flashdev_jedec_id;<br>
- flash->flash_type = &test_flashdev_type;<br>
- flash->page_info_by_offset = &test_flashdev_page_by_off;<br>
- flash->page_info_by_index = &test_flashdev_page_by_index;<br>
- flash->page_count = &test_flashdev_page_count;<br>
- flash->write_block_size = &test_flashdev_wb_size;<br>
+ flash->get_jedec_id = &test_flashdev_get_jedec_id;<br>
+ flash->get_flash_type = &test_flashdev_get_type;<br>
+ flash->get_page_info_by_offset = &test_flashdev_get_page_by_off;<br>
+ flash->get_page_info_by_index = &test_flashdev_get_page_by_index;<br>
+ flash->get_page_count = &test_flashdev_get_page_count;<br>
+ flash->get_write_block_size = &test_flashdev_get_wb_size;<br>
flash->region_table = ftable;<br>
<br>
return flash;<br>
-- <br>
2.34.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>