Skip to content

Commit 75a3f3d

Browse files
authored
Merge pull request #3265 from BernardXiong/comments_cleanup
[kernel] code and comments cleanup
2 parents b9052a5 + 992d3af commit 75a3f3d

File tree

9 files changed

+67
-67
lines changed

9 files changed

+67
-67
lines changed

include/libc/libc_signal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extern "C" {
2424
NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and
2525
sigev_notify_attributes to the sigevent structure. */
2626

27-
union sigval
27+
union sigval
2828
{
2929
int sival_int; /* Integer signal value */
3030
void *sival_ptr; /* Pointer signal value */
@@ -107,7 +107,7 @@ typedef unsigned long sigset_t;
107107

108108
typedef void (*_sig_func_ptr)(int);
109109

110-
struct sigaction
110+
struct sigaction
111111
{
112112
_sig_func_ptr sa_handler;
113113
sigset_t sa_mask;
@@ -163,7 +163,7 @@ typedef unsigned long sigset_t;
163163

164164
typedef void (*_sig_func_ptr)(int);
165165

166-
struct sigaction
166+
struct sigaction
167167
{
168168
_sig_func_ptr sa_handler;
169169
sigset_t sa_mask;

include/rtdef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ typedef siginfo_t rt_siginfo_t;
522522

523523
/**
524524
* CPUs definitions
525-
*
525+
*
526526
*/
527527
struct rt_cpu
528528
{

include/rthw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737
#endif
3838

3939
#ifndef RT_CPU_CACHE_LINE_SZ
40-
#define RT_CPU_CACHE_LINE_SZ 32
40+
#define RT_CPU_CACHE_LINE_SZ 32
4141
#endif
4242

4343
enum RT_HW_CACHE_OPS

src/clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static rt_tick_t rt_tick = 0;
2525
#endif
2626

2727
/**
28-
* This function will init system tick and set it to zero.
28+
* This function will initialize system tick and set it to zero.
2929
* @ingroup SystemInit
3030
*
3131
* @deprecated since 1.1.0, this function does not need to be invoked

src/device.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ RTM_EXPORT(rt_device_unregister);
9595
* @return the error code, RT_EOK on successfully.
9696
*
9797
* @deprecated since 1.2.x, this function is not needed because the initialization
98-
* of a device is performed when applicaiton opens it.
98+
* of a device is performed when application opens it.
9999
*/
100100
rt_err_t rt_device_init_all(void)
101101
{
@@ -162,7 +162,7 @@ rt_device_t rt_device_create(int type, int attach_size)
162162

163163
size = RT_ALIGN(sizeof(struct rt_device), RT_ALIGN_SIZE);
164164
attach_size = RT_ALIGN(attach_size, RT_ALIGN_SIZE);
165-
/* use the totoal size */
165+
/* use the total size */
166166
size += attach_size;
167167

168168
device = (rt_device_t)rt_malloc(size);
@@ -208,7 +208,7 @@ rt_err_t rt_device_init(rt_device_t dev)
208208

209209
RT_ASSERT(dev != RT_NULL);
210210

211-
/* get device init handler */
211+
/* get device_init handler */
212212
if (device_init != RT_NULL)
213213
{
214214
if (!(dev->flag & RT_DEVICE_FLAG_ACTIVATED))
@@ -269,7 +269,7 @@ rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag)
269269
return -RT_EBUSY;
270270
}
271271

272-
/* call device open interface */
272+
/* call device_open interface */
273273
if (device_open != RT_NULL)
274274
{
275275
result = device_open(dev, oflag);
@@ -317,7 +317,7 @@ rt_err_t rt_device_close(rt_device_t dev)
317317
if (dev->ref_count != 0)
318318
return RT_EOK;
319319

320-
/* call device close interface */
320+
/* call device_close interface */
321321
if (device_close != RT_NULL)
322322
{
323323
result = device_close(dev);
@@ -357,7 +357,7 @@ rt_size_t rt_device_read(rt_device_t dev,
357357
return 0;
358358
}
359359

360-
/* call device read interface */
360+
/* call device_read interface */
361361
if (device_read != RT_NULL)
362362
{
363363
return device_read(dev, pos, buffer, size);
@@ -396,7 +396,7 @@ rt_size_t rt_device_write(rt_device_t dev,
396396
return 0;
397397
}
398398

399-
/* call device write interface */
399+
/* call device_write interface */
400400
if (device_write != RT_NULL)
401401
{
402402
return device_write(dev, pos, buffer, size);
@@ -423,7 +423,7 @@ rt_err_t rt_device_control(rt_device_t dev, int cmd, void *arg)
423423
RT_ASSERT(dev != RT_NULL);
424424
RT_ASSERT(rt_object_get_type(&dev->parent) == RT_Object_Class_Device);
425425

426-
/* call device write interface */
426+
/* call device_write interface */
427427
if (device_control != RT_NULL)
428428
{
429429
return device_control(dev, cmd, arg);

0 commit comments

Comments
 (0)