Lines Matching refs:hsa

827 	struct hw_stats_attribute *hsa;  in show_hw_stats()  local
831 hsa = container_of(attr, struct hw_stats_attribute, attr); in show_hw_stats()
832 if (!hsa->port_num) { in show_hw_stats()
842 ret = update_hw_stats(dev, stats, hsa->port_num, hsa->index); in show_hw_stats()
845 ret = print_hw_stat(dev, hsa->port_num, stats, hsa->index, buf); in show_hw_stats()
856 struct hw_stats_attribute *hsa; in show_stats_lifespan() local
860 hsa = container_of(attr, struct hw_stats_attribute, attr); in show_stats_lifespan()
861 if (!hsa->port_num) { in show_stats_lifespan()
883 struct hw_stats_attribute *hsa; in set_stats_lifespan() local
895 hsa = container_of(attr, struct hw_stats_attribute, attr); in set_stats_lifespan()
896 if (!hsa->port_num) { in set_stats_lifespan()
927 struct hw_stats_attribute *hsa; in alloc_hsa() local
929 hsa = kmalloc(sizeof(*hsa), GFP_KERNEL); in alloc_hsa()
930 if (!hsa) in alloc_hsa()
933 hsa->attr.name = (char *)name; in alloc_hsa()
934 hsa->attr.mode = S_IRUGO; in alloc_hsa()
935 hsa->show = show_hw_stats; in alloc_hsa()
936 hsa->store = NULL; in alloc_hsa()
937 hsa->index = index; in alloc_hsa()
938 hsa->port_num = port_num; in alloc_hsa()
940 return &hsa->attr; in alloc_hsa()
945 struct hw_stats_attribute *hsa; in alloc_hsa_lifespan() local
947 hsa = kmalloc(sizeof(*hsa), GFP_KERNEL); in alloc_hsa_lifespan()
948 if (!hsa) in alloc_hsa_lifespan()
951 hsa->attr.name = name; in alloc_hsa_lifespan()
952 hsa->attr.mode = S_IWUSR | S_IRUGO; in alloc_hsa_lifespan()
953 hsa->show = show_stats_lifespan; in alloc_hsa_lifespan()
954 hsa->store = set_stats_lifespan; in alloc_hsa_lifespan()
955 hsa->index = 0; in alloc_hsa_lifespan()
956 hsa->port_num = port_num; in alloc_hsa_lifespan()
958 return &hsa->attr; in alloc_hsa_lifespan()