@@ -509,6 +509,8 @@ static struct pdcspath_entry *pdcspath_entries[] = {
509
509
510
510
/**
511
511
* pdcs_size_read - Stable Storage size output.
512
+ * @kobj: The kobject used to share data with userspace.
513
+ * @attr: The kobject attributes.
512
514
* @buf: The output buffer to write to.
513
515
*/
514
516
static ssize_t pdcs_size_read (struct kobject * kobj ,
@@ -528,6 +530,8 @@ static ssize_t pdcs_size_read(struct kobject *kobj,
528
530
529
531
/**
530
532
* pdcs_auto_read - Stable Storage autoboot/search flag output.
533
+ * @kobj: The kobject used to share data with userspace.
534
+ * @attr: The kobject attributes.
531
535
* @buf: The output buffer to write to.
532
536
* @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag
533
537
*/
@@ -554,6 +558,8 @@ static ssize_t pdcs_auto_read(struct kobject *kobj,
554
558
555
559
/**
556
560
* pdcs_autoboot_read - Stable Storage autoboot flag output.
561
+ * @kobj: The kobject used to share data with userspace.
562
+ * @attr: The kobject attributes.
557
563
* @buf: The output buffer to write to.
558
564
*/
559
565
static ssize_t pdcs_autoboot_read (struct kobject * kobj ,
@@ -564,6 +570,8 @@ static ssize_t pdcs_autoboot_read(struct kobject *kobj,
564
570
565
571
/**
566
572
* pdcs_autosearch_read - Stable Storage autoboot flag output.
573
+ * @kobj: The kobject used to share data with userspace.
574
+ * @attr: The kobject attributes.
567
575
* @buf: The output buffer to write to.
568
576
*/
569
577
static ssize_t pdcs_autosearch_read (struct kobject * kobj ,
@@ -574,6 +582,8 @@ static ssize_t pdcs_autosearch_read(struct kobject *kobj,
574
582
575
583
/**
576
584
* pdcs_timer_read - Stable Storage timer count output (in seconds).
585
+ * @kobj: The kobject used to share data with userspace.
586
+ * @attr: The kobject attributes.
577
587
* @buf: The output buffer to write to.
578
588
*
579
589
* The value of the timer field correponds to a number of seconds in powers of 2.
@@ -601,6 +611,8 @@ static ssize_t pdcs_timer_read(struct kobject *kobj,
601
611
602
612
/**
603
613
* pdcs_osid_read - Stable Storage OS ID register output.
614
+ * @kobj: The kobject used to share data with userspace.
615
+ * @attr: The kobject attributes.
604
616
* @buf: The output buffer to write to.
605
617
*/
606
618
static ssize_t pdcs_osid_read (struct kobject * kobj ,
@@ -619,6 +631,8 @@ static ssize_t pdcs_osid_read(struct kobject *kobj,
619
631
620
632
/**
621
633
* pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output.
634
+ * @kobj: The kobject used to share data with userspace.
635
+ * @attr: The kobject attributes.
622
636
* @buf: The output buffer to write to.
623
637
*
624
638
* This can hold 16 bytes of OS-Dependent data.
@@ -645,6 +659,8 @@ static ssize_t pdcs_osdep1_read(struct kobject *kobj,
645
659
646
660
/**
647
661
* pdcs_diagnostic_read - Stable Storage Diagnostic register output.
662
+ * @kobj: The kobject used to share data with userspace.
663
+ * @attr: The kobject attributes.
648
664
* @buf: The output buffer to write to.
649
665
*
650
666
* I have NFC how to interpret the content of that register ;-).
@@ -669,6 +685,8 @@ static ssize_t pdcs_diagnostic_read(struct kobject *kobj,
669
685
670
686
/**
671
687
* pdcs_fastsize_read - Stable Storage FastSize register output.
688
+ * @kobj: The kobject used to share data with userspace.
689
+ * @attr: The kobject attributes.
672
690
* @buf: The output buffer to write to.
673
691
*
674
692
* This register holds the amount of system RAM to be tested during boot sequence.
@@ -697,6 +715,8 @@ static ssize_t pdcs_fastsize_read(struct kobject *kobj,
697
715
698
716
/**
699
717
* pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output.
718
+ * @kobj: The kobject used to share data with userspace.
719
+ * @attr: The kobject attributes.
700
720
* @buf: The output buffer to write to.
701
721
*
702
722
* This can hold pdcs_size - 224 bytes of OS-Dependent data, when available.
@@ -729,6 +749,8 @@ static ssize_t pdcs_osdep2_read(struct kobject *kobj,
729
749
730
750
/**
731
751
* pdcs_auto_write - This function handles autoboot/search flag modifying.
752
+ * @kobj: The kobject used to share data with userspace.
753
+ * @attr: The kobject attributes.
732
754
* @buf: The input buffer to read from.
733
755
* @count: The number of bytes to be read.
734
756
* @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag
@@ -801,6 +823,8 @@ static ssize_t pdcs_auto_write(struct kobject *kobj,
801
823
802
824
/**
803
825
* pdcs_autoboot_write - This function handles autoboot flag modifying.
826
+ * @kobj: The kobject used to share data with userspace.
827
+ * @attr: The kobject attributes.
804
828
* @buf: The input buffer to read from.
805
829
* @count: The number of bytes to be read.
806
830
*
@@ -817,6 +841,8 @@ static ssize_t pdcs_autoboot_write(struct kobject *kobj,
817
841
818
842
/**
819
843
* pdcs_autosearch_write - This function handles autosearch flag modifying.
844
+ * @kobj: The kobject used to share data with userspace.
845
+ * @attr: The kobject attributes.
820
846
* @buf: The input buffer to read from.
821
847
* @count: The number of bytes to be read.
822
848
*
@@ -833,6 +859,8 @@ static ssize_t pdcs_autosearch_write(struct kobject *kobj,
833
859
834
860
/**
835
861
* pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input.
862
+ * @kobj: The kobject used to share data with userspace.
863
+ * @attr: The kobject attributes.
836
864
* @buf: The input buffer to read from.
837
865
* @count: The number of bytes to be read.
838
866
*
@@ -870,6 +898,8 @@ static ssize_t pdcs_osdep1_write(struct kobject *kobj,
870
898
871
899
/**
872
900
* pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input.
901
+ * @kobj: The kobject used to share data with userspace.
902
+ * @attr: The kobject attributes.
873
903
* @buf: The input buffer to read from.
874
904
* @count: The number of bytes to be read.
875
905
*
@@ -1023,7 +1053,7 @@ pdcs_unregister_pathentries(void)
1023
1053
static int __init
1024
1054
pdc_stable_init (void )
1025
1055
{
1026
- int rc = 0 , error = 0 ;
1056
+ int rc = 0 , error ;
1027
1057
u32 result ;
1028
1058
1029
1059
/* find the size of the stable storage */
@@ -1052,6 +1082,10 @@ pdc_stable_init(void)
1052
1082
1053
1083
/* Don't forget the root entries */
1054
1084
error = sysfs_create_group (stable_kobj , & pdcs_attr_group );
1085
+ if (error ) {
1086
+ rc = - ENOMEM ;
1087
+ goto fail_ksetreg ;
1088
+ }
1055
1089
1056
1090
/* register the paths kset as a child of the stable kset */
1057
1091
paths_kset = kset_create_and_add ("paths" , NULL , stable_kobj );
0 commit comments